Skip to content

Instantly share code, notes, and snippets.

@Olaw2jr
Last active June 24, 2019 08:06
Show Gist options
  • Save Olaw2jr/a5c7a65593dadc6e8a9a935e1f3a6f60 to your computer and use it in GitHub Desktop.
Save Olaw2jr/a5c7a65593dadc6e8a9a935e1f3a6f60 to your computer and use it in GitHub Desktop.
{
"payload_type":"single_user_test_results_group",
"payload_status":"live", // "live": Actual Results. "verify": Sample Results when setting up the Webhook from within your account.
"test":{
"test_id":103,
"test_name":"Sample Test Name"
},
"group":{
"group_id":104,
"group_name":"Sample Group Name"
},
"result":{
"user_id":"3276524", // Each registered User has a unique ID user_id in ClassMarker.
"first":"Mary",
"last":"Williams",
"email":"[email protected]",
"percentage":75.0,
"points_scored":9.0,
"points_available":12.0,
"requires_grading":"Yes", // Only Exams that include "Essay" style questions will require grading Learn more.
"time_started":1436263102, // Never changes per result.
"time_finished":1436263702, // Can update on re-sends (EG: An Exam is re-opened by an Administrator to give a User more time).
"duration":"00:05:40",
"percentage_passmark":50,
"passed":true, // true/false Note: If no "Passmark Score" is set for an exam, "true" will be used.
"feedback":"Thanks for completing our Exam!", // Overall exam feedback as set by Administrators. Feedback is optional.
"give_certificate_only_when_passed":false, // true/false Exams can be setup to disallow certificate downloading if a User fails the Exam.
"certificate_url":"https://www.classmarker.com/pdf/certificate/SampleCertificate.pdf"
"view_results_url":"https://www.classmarker.com/view/results/?required_parameters_here" // Unique URL per Test result for viewing formatted Test results back on ClassMarker (without being logged into a ClassMarker account). An Access control password is required for viewing access. Set this password on your My account page.
},
"questions": [ // Questions, User Responses and Category Results are only included if selected in your Webhook settings.
{
"question_id": 3542854,
"question_type": "multiplechoice",
"category_id": 1,
"points_available": 2, // Points can be to one decimal place.
"question": "What is the first step for treating a skin burn?",
"options": {
"A": "Apply oil or butter",
"B": "Nothing should be done",
"C": "Soak in water for five minutes",
"D": "Apply antibiotic ointment"
},
"correct_option": "C",
"points_scored": 2, // Points can be to one decimal place.
"user_response": "C", // If Question was not answered, "user_response" key will not exist.
"result": "correct", // Possible Values: correct / partial_correct / incorrect / requires_grading / unanswered.
"feedback": "Great, and remember, never use oil on Skin burns!" // Optional: Question Feedback. If no Question Feedback is set, "feedback" key will not exist
},
{
"question_id": 10254859,
"question_type": "multiplechoice",
"category_id": 2,
"points_available": 2,
"question": "Select the options you should take when the fire alarm sounds:",
"options": {
"A": "Call you manager to see if you can leave the building",
"B": "Exit the building immediately",
"C": "Use the Lifts to exit faster",
"D": "Use the stairwell to exit"
},
"correct_option": "B,D", // Note this multiple choice question contains 2 correct options.
"points_scored": 1,
"user_response": "B",
"result": "partial_correct",
"feedback": "That is incorrect, the correct answers are A and C"
},
{
"question_id": 5485962,
"question_type": "truefalse",
"category_id": 3,
"points_available": 1,
"question": "Our Support staff work 7 day a week",
"options": {
"A": "True",
"B": "False"
},
"correct_option": "A",
"points_scored": 1,
"user_response": "A",
"result": "correct",
"feedback": "That is correct, we provide 7 day support"
},
{
"question_id": 3896152,
"question_type": "freetext",
"category_id": 5,
"points_available": 1,
"question": "Our company website is: www.______.com",
"options": {
"exact_match": [
{
"content": "example"
},
{
"content": "example.com"
},
{
"content": "www.example.com"
},
{
"content": "http://www.example.com"
},
{
"content": "https://www.example.com"
}
]
},
"points_scored": 1,
"user_response": "example",
"result": "correct",
"feedback": "Correct, always send our customers to our main website: www.example.com"
},
{
"question_id": 6403973,
"question_type": "matching",
"category_id": 2,
"points_available": 4,
"question": "Match the options below:",
"points_scored": 3,
"options": {
"A": {
"clue": "Product faulty",
"match": "Exchange or Refund",
"correct_option": "A",
"user_response": "A"
},
"B": {
"clue": "Customer mis-used and broke product",
"match": "No refund",
"correct_option": "B",
"user_response": "B"
},
"C": {
"clue": "Customer broke factory seal",
"match": "No refund",
"correct_option": "B", // Note: The Exam administrator has set two Matches to equal the same Clue "B".
"user_response": "B"
},
"D": {
"clue": "Incorrect product size purchased",
"match": "Exchange",
"correct_option": "D",
"user_response": "A"
},
"E": {
"match": "Have customer removed by security" // This is a Incorrect Match with no corresponding Clue, these can be used to help make Matching Questions more difficult.
}
},
"result": "partial_correct",
"feedback": "Please check your incorrect matches"
},
{
"question_id": 444564,
"question_type": "essay",
"category_id": 5,
"points_available": 1,
"question": "Describe some advantages of having test papers graded instantly:",
"points_scored": 0,
"user_response": "Users can see their results instantly, grading is accurate, save time from manual grading",
"result": "requires_grading",
"custom_feedback": "", // "custom_feedback" is only used for Essay Questions. Administrators can add when grading Essay Questions.
"feedback": "Generic feedback here"
},
{
"question_id": 442810,
"question_type": "grammar",
"category_id": 3,
"points_available": 1,
"question": "The car was parkked over their!",
"answer": "The car was parked over there!",
"points_scored": 1,
"user_response": "The car was parked over there!",
"result": "correct",
"feedback": "Well done!"
}
],
"category_results": [ // Category results from Questions are only included if selected in your Webhook settings.
{
"category_id": 1,
"name": "Health and Safety",
"percentage": 66.7, // Percentage can be to one decimal place.
"points_available": 6, // Points can be to one decimal place.
"points_scored": 4 // Points can be to one decimal place.
},
{
"category_id": 2,
"name": "Exit Procedure",
"percentage": 100,
"points_available": 2,
"points_scored": 2
},
{
"category_id": 3,
"name": "General Knowledge",
"percentage": 100,
"points_available": 2,
"points_scored": 2
},
{
"category_id": 5,
"name": "Sales",
"percentage": 50,
"points_available": 2,
"points_scored": 1
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment