/submit-quiz
Submit all answers for a quiz, saving the data and grading the submission.
Parameter
Type
Description
// Example to submit a quiz
fetch('https://api.arlinear.com/functions/v1/submit-quiz', {
method: 'POST',
headers: {
'Authorization': '<Your API Key>',
},
body: JSON.stringify({
'quizId': 'ba777045-7033-4701-b17b-da9e90dcd41e',
'primaryKey': 'emily@school.com',
'studentInput': [0, "the mitochondria is the powerhouse of the cell", ...] // see note below
})
})
/*
--- for studentInput ---
for short answer questions: pass in a string for student input (i.e "the mitochondria is the powerhouse of the cell")
for multiple choice questions: pass in mc 'choices' index for student input (i.e. 0, 1, 2, 3, etc...)
Example:
if you want to use the first option as an answer, pass in "0" as the studentInput
"choices": [
{
"value": " 11",
"isCorrect": true,
"type": "choice"
},
{
"value": " 14",
"isCorrect": false,
"type": "choice"
},
{
"value": " 9",
"isCorrect": false,
"type": "choice"
}
]
*/Last updated