/check-answer
Check the correctness of an individual answer & get written feedback.
Parameter
Type
Description
// Example to check an answer
fetch("https://api.arlinear.com/functions/v1/check-answer", {
method: "POST",
headers: {
Authorization: "<Your API Key>",
},
body: JSON.stringify({
questionId: "b03ab02d-95fe-4a29-94a2-3554b1fd4e07",
studentInput: "mitochondria is the powerhouse of the cell", // or 0 (index of choice) for multiple choice questions (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