// Numbas version: exam_results_page_options {"name": "Numbas demo: choose several 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 several from a list part type", "tags": [], "metadata": {"description": "

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

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

The choose several from a list part type presents the student with a list of choices, of which they have to select one or more. Each choice awards a different number of marks when it is chosen, and the student is awarded the sum of the marks for their choices.

\n

See this question on the public editor.

", "advice": "", "rulesets": {}, "extensions": [], "variables": {"pick_odd_numbers": {"name": "pick_odd_numbers", "group": "Ungrouped variables", "definition": "random(true,false)", "description": "", "templateType": "anything"}, "numbers_to_pick": {"name": "numbers_to_pick", "group": "Ungrouped variables", "definition": "if(pick_odd_numbers,\"odd\",\"even\")", "description": "", "templateType": "anything"}, "numbers_marking_matrix": {"name": "numbers_marking_matrix", "group": "Ungrouped variables", "definition": "map(\n award(1,mod(j,2) = if(pick_odd_numbers,1,0)),\n j,\n 1..4\n)", "description": "", "templateType": "anything"}, "number_of_correct_choices": {"name": "number_of_correct_choices", "group": "Ungrouped variables", "definition": "random(2..total_choices-2 except 5)", "description": "", "templateType": "anything"}, "number_of_distractors": {"name": "number_of_distractors", "group": "Ungrouped variables", "definition": "total_choices - number_of_correct_choices", "description": "", "templateType": "anything"}, "random_choices": {"name": "random_choices", "group": "Ungrouped variables", "definition": "map(\"Correct choice \"+j,j,1..number_of_correct_choices)\n+\nmap(\"Incorrect choice \"+j,j,1..number_of_distractors)", "description": "", "templateType": "anything"}, "random_marking_matrix": {"name": "random_marking_matrix", "group": "Ungrouped variables", "definition": "repeat(12/number_of_correct_choices,number_of_correct_choices) + repeat(-12/number_of_correct_choices,number_of_distractors)", "description": "", "templateType": "anything"}, "total_choices": {"name": "total_choices", "group": "Ungrouped variables", "definition": "random(4..7)", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["pick_odd_numbers", "numbers_to_pick", "numbers_marking_matrix", "total_choices", "number_of_correct_choices", "number_of_distractors", "random_choices", "random_marking_matrix"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "m_n_2", "useCustomName": true, "customName": "Award marks for correct choices", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

In this part, the student is awarded 1 mark for each correct choice. However, selecting all the choices also gives you full marks...

", "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "checkbox", "displayColumns": 0, "minAnswers": 0, "maxAnswers": 0, "warningType": "none", "showCellAnswerState": true, "markingMethod": "sum ticked cells", "choices": ["Correct choice", "Correct choice", "Incorrect choice", "Incorrect choice"], "matrix": ["1", "1", 0, 0], "distractors": ["", "", "", ""]}, {"type": "m_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": "checkbox", "displayColumns": "3", "minAnswers": 0, "maxAnswers": 0, "warningType": "none", "showCellAnswerState": true, "choices": ["Correct choice", "Correct choice", "Incorrect choice", "Incorrect choice", "Incorrect choice", "Incorrect choice"], "matrix": ["1", "1", 0, 0, 0, 0], "distractors": ["", "", "", "", "", ""]}, {"type": "m_n_2", "useCustomName": true, "customName": "Restricted number of answers", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

You must pick exactly two answers.

", "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "checkbox", "displayColumns": "1", "minAnswers": "2", "maxAnswers": "2", "warningType": "prevent", "showCellAnswerState": true, "choices": ["Correct choice", "Correct choice", "Incorrect choice", "Incorrect choice"], "matrix": ["1", "1", 0, 0], "distractors": ["", "", "", ""]}, {"type": "m_n_2", "useCustomName": true, "customName": "Negative marking", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

You can take away marks when incorrect choices are selected, to discourage the student from picking at random.

\n

Each incorrect choice for this part takes away 2 marks.

", "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "checkbox", "displayColumns": "1", "minAnswers": 0, "maxAnswers": 0, "warningType": "none", "showCellAnswerState": true, "choices": ["Correct choice", "Correct choice", "Correct choice", "Incorrect choice", "Incorrect choice"], "matrix": ["1", "1", "1", "-2", "-2"], "distractors": ["", "", "", "", ""]}, {"type": "m_n_2", "useCustomName": true, "customName": "Score per matched cell", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

This part uses the \"score per matched cell\" marking method - you will be awarded 1 mark for each correct ticked or unticked box.

\n

Tick each mammal.

", "minMarks": 0, "maxMarks": "2", "shuffleChoices": true, "displayType": "checkbox", "displayColumns": 0, "minAnswers": 0, "maxAnswers": 0, "warningType": "none", "showCellAnswerState": true, "markingMethod": "score per matched cell", "choices": ["Cat", "Dog", "Shark", "Sparrow"], "matrix": ["1", "1", 0, 0], "distractors": ["", "", "", ""]}, {"type": "m_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": "checkbox", "displayColumns": "1", "minAnswers": 0, "maxAnswers": 0, "warningType": "none", "showCellAnswerState": true, "choices": ["Correct choice 1", "Correct choice 1", "Incorrect choice 1", "Incorrect choice 2"], "matrix": ["1", "1", "-1", "-1"], "distractors": ["Correct choice 1 is indeed correct!", "Correct choice 2 is indeed correct!", "Incorrect choice 1 is not correct.", "Incorrect choice 2 is not correct."]}, {"type": "m_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": "checkbox", "displayColumns": "1", "minAnswers": 0, "maxAnswers": 0, "warningType": "none", "showCellAnswerState": true, "choices": ["Correct choice A", "Correct choice B", "Correct choice C", "Incorrect choice 1", "Incorrect choice 2"], "matrix": ["1", "1", "1", 0, 0], "distractors": ["", "", "", "", ""]}, {"type": "m_n_2", "useCustomName": true, "customName": "Marking depends on 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, pick {numbers_to_pick} numbers.

", "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "checkbox", "displayColumns": 0, "minAnswers": 0, "maxAnswers": 0, "warningType": "none", "showCellAnswerState": true, "choices": ["1", "2", "3", "4"], "matrix": "numbers_marking_matrix"}, {"type": "m_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 {number_of_correct_choices} correct choices and {number_of_distractors} incorrect choices.

", "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "checkbox", "displayColumns": "1", "minAnswers": 0, "maxAnswers": 0, "warningType": "none", "showCellAnswerState": true, "choices": "random_choices", "matrix": "random_marking_matrix"}], "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/"}]}