// Numbas version: exam_results_page_options {"name": "Randomly choose some LaTeX strings", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Randomly choose some LaTeX strings", "tags": [], "metadata": {"description": "

This shows how to define a list of LaTeX strings, and pick a couple of them at random to display.

\n

The \"JSON data\" type is used to define the available strings, so they're automatically marked as \"safe\" and curly braces aren't interpreted as variable substitution.

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

$\\var{latex(join(chosen_options,\", \"))}$

", "advice": "", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"options": {"name": "options", "group": "Ungrouped variables", "definition": "json_decode(safe(\"[\\n\\\"\\\\\\\\pi\\\",\\n\\\"e\\\",\\n\\\"\\\\\\\\frac{a}{b}\\\",\\n\\\"\\\\\\\\sqrt{2}\\\"\\n]\"))", "description": "

A collection of strings that might be chosen.

\n

This is defined as \"JSON data\" so that each string is automatically marked as \"safe\", and curly braces aren't interpreted as variable substitution.

", "templateType": "json", "can_override": false}, "chosen_options": {"name": "chosen_options", "group": "Ungrouped variables", "definition": "shuffle(options)[0..2]", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["options", "chosen_options"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [], "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/"}]}