{ "source": { "author": { "name": "Christian Lawson-Perfect" } }, "name": "Yes/no", "short_name": "yes-no", "description": "
The student is shown two radio choices: \"Yes\" and \"No\". One of them is correct.
", "help_url": "", "input_widget": "radios", "input_options": { "correctAnswer": "if(eval(settings[\"correct_answer_expr\"]), 0, 1)", "hint": { "static": true, "value": "" }, "choices": { "static": true, "value": [ "Yes", "No" ] } }, "can_be_gap": true, "can_be_step": true, "marking_script": "mark:\nif(studentanswer=correct_answer,\n correct(),\n incorrect()\n)\n\ninterpreted_answer:\nstudentAnswer=0\n\ncorrect_answer:\nif(eval(settings[\"correct_answer_expr\"]),0,1)", "marking_notes": [ { "name": "mark", "description": "This is the main marking note. It should award credit and provide feedback based on the student's answer.", "definition": "if(studentanswer=correct_answer,\n correct(),\n incorrect()\n)" }, { "name": "interpreted_answer", "description": "A value representing the student's answer to this part.", "definition": "studentAnswer=0" }, { "name": "correct_answer", "description": "", "definition": "if(eval(settings[\"correct_answer_expr\"]),0,1)" } ], "settings": [ { "name": "correct_answer_expr", "label": "Is the answer \"Yes\"?", "help_url": "", "hint": "An expression which evaluates totrue
or false
.",
"input_type": "mathematical_expression",
"default_value": "true",
"subvars": false
}
],
"public_availability": "always",
"published": true,
"extensions": []
}