Skip to main content

Quiz results

Quiz results are returned after the quiz is completed. If no students list was provided, students will be named as seen in Classwise (e.g., "Classpad 1", "Classpad 2", etc.).

Quiz finished with students

JSON example:

{
"message_type": "quiz_result",
"data": {
"mode": "Default",
"title": "Sample Quiz",
"scoreboard": [
{
"position": 1,
"fullName": "Jason Martinez",
"correctAnswers": 5,
"percentage": 100
},
{
"position": 2,
"fullName": "Emily Johnson",
"correctAnswers": 5,
"percentage": 100
},
{
"position": 3,
"fullName": "Michael Smith",
"correctAnswers": 3,
"percentage": 60
},
{
"position": 4,
"fullName": "Sarah Brown",
"correctAnswers": 2,
"percentage": 40
}
],
"answers": [
{
"question": "What is the capital of France?",
"studentAnswers": [
{
"fullName": "Jason Martinez",
"answer": "Paris",
"isCorrect": true
},
{
"fullName": "Emily Johnson",
"answer": "Paris",
"isCorrect": true
},
{
"fullName": "Michael Smith",
"answer": "Paris",
"isCorrect": true
},
{
"fullName": "Sarah Brown",
"answer": "Paris",
"isCorrect": true
}
]
},
{
"question": "Which of these is the Mona Lisa?",
"studentAnswers": [
{
"fullName": "Jason Martinez",
"answer": "Option 2",
"isCorrect": true
},
{
"fullName": "Emily Johnson",
"answer": "Option 2",
"isCorrect": true
},
{
"fullName": "Michael Smith",
"answer": "Option 4",
"isCorrect": false
},
{
"fullName": "Sarah Brown",
"answer": "Option 3",
"isCorrect": false
}
]
},
{
"question": "The Earth is flat.",
"studentAnswers": [
{
"fullName": "Jason Martinez",
"answer": "False",
"isCorrect": true
},
{
"fullName": "Emily Johnson",
"answer": "False",
"isCorrect": true
},
{
"fullName": "Michael Smith",
"answer": "False",
"isCorrect": true
},
{
"fullName": "Sarah Brown",
"answer": "True",
"isCorrect": false
}
]
},
{
"question": "What is this famous landmark? (Watch the video)",
"studentAnswers": [
{
"fullName": "Jason Martinez",
"answer": "Eiffel Tower",
"isCorrect": true
},
{
"fullName": "Emily Johnson",
"answer": "Eiffel Tower",
"isCorrect": true
},
{
"fullName": "Michael Smith",
"answer": "Statue of Liberty",
"isCorrect": false
},
{
"fullName": "Sarah Brown",
"answer": "Statue of Liberty",
"isCorrect": false
}
]
},
{
"question": "What sound is this?",
"studentAnswers": [
{
"fullName": "Jason Martinez",
"answer": "Cat Meowing",
"isCorrect": true
},
{
"fullName": "Emily Johnson",
"answer": "Cat Meowing",
"isCorrect": true
},
{
"fullName": "Michael Smith",
"answer": "Cat Meowing",
"isCorrect": true
},
{
"fullName": "Sarah Brown",
"answer": "Cat Meowing",
"isCorrect": true
}
]
}
]
}
}

Fields definitions:

Root Object

FieldTypeRequiredConstraintsDescription
message_typestringYesquiz_resultMessage type indicating it contains quiz results
dataobjectYesQuiz result data

Data Object (PartnerQuizQuestionData)

FieldTypeRequiredConstraintsDescription
modestringYesOne of: Default, Test, CustomMode of the quiz
titlestringYesTitle of the quiz
totalQuestionsnumberYes—-Total number of questions displayed in quiz
answersarrayYesList of answered questions
scoreboardarrayYesFinal scoreboard

Question Object (answers[])

FieldTypeRequiredConstraintsDescription
questionstringYesThe quiz question text
studentAnswersarrayYesList of student answers to this question

Student Answer Object (studentAnswers[])

FieldTypeRequiredConstraintsDescription
fullNamestringYesFull name of the student
answerstringYesThe student’s answer
isCorrectbooleanYesWhether the answer was correct

Scoreboard Entry Object (scoreboard[])

FieldTypeRequiredConstraintsDescription
positionnumberYesFinal rank in the scoreboard
fullNamestringYesStudent’s full name
percentagenumberYesPercentage of correct answers
correctAnswersnumberYesNumber of correct answers