// Numbas version: exam_results_page_options {"name": "Numbas demo: choose one from a list part type", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Numbas demo: choose one from a list part type", "tags": [], "metadata": {"description": "

A demo of the choose one from a list part and its options.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

The choose one from a list part type presents the student with a list of choices, and asks them to pick the right one. Each choice can award a different number of marks.

\n

See this question on the public editor.

", "advice": "", "rulesets": {}, "extensions": [], "variables": {"random_correct_choice": {"name": "random_correct_choice", "group": "Ungrouped variables", "definition": "random(0..2)", "description": "", "templateType": "anything"}, "correct_choice": {"name": "correct_choice", "group": "Ungrouped variables", "definition": "[\"A\",\"B\",\"C\"][random_correct_choice]", "description": "", "templateType": "anything"}, "random_number_of_distractors": {"name": "random_number_of_distractors", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything"}, "random_choices": {"name": "random_choices", "group": "Ungrouped variables", "definition": "[\"Correct choice\"]+map(\"Incorrect choice \"+j,j,1..random_number_of_distractors)", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["random_correct_choice", "correct_choice", "random_number_of_distractors", "random_choices"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "1_n_2", "useCustomName": true, "customName": "One correct answer", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Sometimes there's only one correct answer.

", "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": ["The correct answer", "An incorrect answer", "Another incorrect answer"], "matrix": ["1", 0, 0], "distractors": ["", "", ""]}, {"type": "1_n_2", "useCustomName": true, "customName": "Display choices in columns", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

You can display the choices in columns.

", "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": "3", "showCellAnswerState": true, "choices": ["Correct", "Incorrect", "Incorrect", "Incorrect", "Incorrect", "Incorrect"], "matrix": ["1", 0, 0, 0, 0, 0], "distractors": ["", "", "", "", "", ""]}, {"type": "1_n_2", "useCustomName": true, "customName": "Choices worth different amounts", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Each choice awards a different number of marks.

", "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": "1", "showCellAnswerState": true, "choices": ["This incorrect choice doesn't award any marks.", "This nearly-correct choice awards one mark.", "This completely correct choice awards three marks."], "matrix": [0, "1", "3"], "distractors": ["", "", ""]}, {"type": "1_n_2", "useCustomName": true, "customName": "Distractor text", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

For each choice, you can write a message to display to the student if they choose it.

", "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": ["The right choice.", "The wrong choice."], "matrix": ["1", 0], "distractors": ["Well done spotting the correct choice.", "Why did you pick the wrong choice?"]}, {"type": "1_n_2", "useCustomName": true, "customName": "Drop-down list", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Rather than radio buttons, you can present the choices in a drop-down list.

", "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showCellAnswerState": true, "choices": ["Correct choice", "Incorrect choice"], "matrix": ["1", 0], "distractors": ["", ""]}, {"type": "1_n_2", "useCustomName": true, "customName": "Shuffle the order of choices", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

You can randomly shuffle the order of the choices.

\n

Click the \"Try another question like this one\" button to see these choices in a different order.

", "minMarks": 0, "maxMarks": 0, "shuffleChoices": true, "displayType": "radiogroup", "displayColumns": "1", "showCellAnswerState": true, "choices": ["Correct choice", "Incorrect choice 1", "Incorrect choice 2", "Incorrect choice 3"], "matrix": ["1", 0, 0, 0], "distractors": ["", "", "", ""]}, {"type": "1_n_2", "useCustomName": true, "customName": "Marking depends on question variables", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

You can set the number of marks based on question variables.

\n

This time, the correct answer is {correct_choice}.

", "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": ["A", "B", "C"], "matrix": "map(award(1,j=random_correct_choice),j,0..2)"}, {"type": "1_n_2", "useCustomName": true, "customName": "Variable number of choices", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

The choices themselves can depend on question variables, too.

\n

This time, there are {random_number_of_distractors+1} choices.

", "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": "1", "showCellAnswerState": true, "choices": "random_choices", "matrix": "[1]+repeat(0,random_number_of_distractors)"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "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/"}]}