// Numbas version: exam_results_page_options {"name": "Custom marking script for \"choose one from a list\"", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"metadata": {"description": "

A very simple example of a custom marking script for a \"choose one from a list\" part

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "preamble": {"css": "", "js": ""}, "advice": "", "rulesets": {}, "variable_groups": [], "functions": {}, "ungrouped_variables": [], "name": "Custom marking script for \"choose one from a list\"", "tags": [], "variablesTest": {"condition": "", "maxRuns": 100}, "extensions": [], "variables": {}, "statement": "", "parts": [{"type": "1_n_2", "maxMarks": 0, "variableReplacementStrategy": "originalfirst", "marks": 0, "prompt": "

Choose Yes

", "displayColumns": 0, "minMarks": 0, "distractors": ["", ""], "shuffleChoices": false, "scripts": {"mark": {"script": "// the validation script requires these properties to be set\nthis.validation = {\n wrongNumber: false,\n numTicks: 1\n}\n\n// work out which option was ticked\nvar answer;\nfor(var i=0;iYes

", "

No

"], "showCorrectAnswer": true, "showFeedbackIcon": true, "matrix": ["1", 0]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}