// Numbas version: exam_results_page_options {"name": "Randomise the available choices in a multiple-choice part", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Randomise the available choices in a multiple-choice part", "tags": [], "metadata": {"description": "

Demonstrates how to set up a \"choose one from a list\" part where the number of choices is randomised.

The part is given a list of labels for the choices as well as a list specifying the marks to award for each choice.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "", "advice": "", "rulesets": {}, "extensions": [], "variables": {"num_choices": {"name": "num_choices", "group": "Ungrouped variables", "definition": "random(3 .. 5#1)", "description": "

How many choices there are.

", "templateType": "randrange"}, "correct_choice": {"name": "correct_choice", "group": "Ungrouped variables", "definition": "random(1..num_choices)", "description": "

The number of the correct choice

", "templateType": "anything"}, "choices": {"name": "choices", "group": "Ungrouped variables", "definition": "map(\"Choice \"+x, x, 1..num_choices)", "description": "

Text for each of the choices.

", "templateType": "anything"}, "marking_matrix": {"name": "marking_matrix", "group": "Ungrouped variables", "definition": "map(award(1,x=correct_choice), x, 1..num_choices)", "description": "

The marking matrix - award one mark for the correct choice.

", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["num_choices", "correct_choice", "choices", "marking_matrix"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

There are {num_choices} choices.

\n

The correct choice is choice {correct_choice}.

", "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": "choices", "matrix": "marking_matrix"}], "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/"}]}