// Numbas version: exam_results_page_options {"name": "Testing custom choices", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"statement": "

Choose something

", "extensions": [], "functions": {}, "ungrouped_variables": ["t", "markingmatrix"], "preamble": {"css": "", "js": ""}, "advice": "

Chosen something?

", "variables": {"t": {"definition": "random(0..2)", "templateType": "anything", "description": "", "name": "t", "group": "Ungrouped variables"}, "markingmatrix": {"definition": "if(t=0,[1,0,0],if(t=1,[0,1,0],[0,0,1]))", "templateType": "anything", "description": "", "name": "markingmatrix", "group": "Ungrouped variables"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "rulesets": {}, "parts": [{"variableReplacements": [], "scripts": {}, "type": "1_n_2", "marks": 0, "displayColumns": 0, "minMarks": 0, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "choices": ["Choice 1", "Choice 2", "Choice 3"], "showFeedbackIcon": true, "displayType": "radiogroup", "shuffleChoices": false, "prompt": "

choose the correct answer {t+1}

\n

The marking matrix is given by the identity matrix, but the outcome  has to be a list so the custom marking matrix is list(id(3)[t])={list(id(3)[t])} where t determines the correct answer. 

", "matrix": "list(id(3)[t])", "maxMarks": 0}, {"variableReplacements": [], "scripts": {}, "type": "1_n_2", "marks": 0, "displayColumns": 0, "minMarks": 0, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "choices": ["Choice 1", "Choice 2", "Choice 3"], "showFeedbackIcon": true, "displayType": "radiogroup", "shuffleChoices": false, "prompt": "

As above, but uses a custom matrix defined by author

", "matrix": "markingmatrix", "maxMarks": 0}], "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

As the title says

"}, "variable_groups": [], "name": "Testing custom choices", "tags": [], "type": "question", "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}]}]}], "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}]}