// Numbas version: finer_feedback_settings {"name": "Randomise the correct answer to a multiple choice part", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"statement": "
My jumper is {colour}.
", "variables": {"colour": {"group": "Ungrouped variables", "name": "colour", "definition": "random(\"red\",\"green\",\"blue\")", "description": "The colour of the jumper.
", "templateType": "anything"}, "marking_matrix": {"group": "Ungrouped variables", "name": "marking_matrix", "definition": "switch(\n colour=\"red\",\n [1,0,0],\n colour=\"green\",\n [0,1,0],\n // otherwise, the colour is blue\n [0,0,1]\n)", "description": "Marking matrix for part b. The choices are \"red\", \"green\" and \"blue\".
", "templateType": "anything"}}, "name": "Randomise the correct answer to a multiple choice part", "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "This question shows how to make the correct answer to a \"choose one from a list\" part depend on randomised question variables, in a couple of ways. The first part uses JME expressions to define the marks available for each choice. The second part uses the \"custom marking matrix\" option.What colour is my jumper?
", "minMarks": 0, "displayType": "radiogroup", "customMarkingAlgorithm": "", "displayColumns": 0, "variableReplacements": [], "showFeedbackIcon": true, "choices": ["Red", "Green", "Blue"], "customName": "", "adaptiveMarkingPenalty": 0, "useCustomName": false, "type": "1_n_2", "matrix": ["award(1,colour=\"red\")", "award(1,colour=\"green\")", "award(1,colour=\"blue\")"], "shuffleChoices": false, "marks": 0, "maxMarks": 0, "unitTests": []}, {"showCellAnswerState": true, "extendBaseMarkingAlgorithm": true, "scripts": {}, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "prompt": "What colour is my jumper?
", "minMarks": 0, "displayType": "radiogroup", "customMarkingAlgorithm": "", "displayColumns": 0, "variableReplacements": [], "showFeedbackIcon": true, "choices": ["Red", "Green", "Blue"], "customName": "", "adaptiveMarkingPenalty": 0, "useCustomName": false, "type": "1_n_2", "matrix": "marking_matrix", "shuffleChoices": false, "marks": 0, "maxMarks": 0, "unitTests": []}], "functions": {}, "tags": [], "extensions": [], "variable_groups": [], "rulesets": {}, "preamble": {"css": "", "js": ""}, "ungrouped_variables": ["colour", "marking_matrix"], "advice": "", "type": "question", "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}