// Numbas version: exam_results_page_options {"name": "Conditional visibility", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variablesTest": {"maxRuns": 100, "condition": ""}, "rulesets": {}, "variables": {"a": {"definition": "random(1..3)", "group": "Quadratic equation", "description": "", "templateType": "anything", "name": "a"}, "b": {"definition": "random(-6..6 except 0)", "group": "Quadratic equation", "description": "", "templateType": "anything", "name": "b"}, "c": {"definition": "random(-4..4 except 0)", "group": "Quadratic equation", "description": "", "templateType": "anything", "name": "c"}, "scenario": {"definition": "random(1,2,3)", "group": "Scenario", "description": "

Choose between three scenarios.

", "templateType": "anything", "name": "scenario"}}, "metadata": {"notes": "", "description": "

Show one of several blocks of text depending on the value of a question variable.

\n

As well as a simple check for the value of a variable, the condition to display a block of text can be a complex expression in any of the question variables - in this example, depending on the discriminant of the generated quadratic.

", "licence": "Creative Commons Attribution 4.0 International"}, "functions": {}, "name": "Conditional visibility", "advice": "", "showQuestionGroupNames": false, "tags": ["conditional visibility", "demo"], "preamble": {"css": "", "js": ""}, "ungrouped_variables": [], "statement": "

First, this question picks between three scenarios.

\n
\n

This is Scenario 1.

\n
\n
\n

This is Scenario 2.

\n
\n
\n

This is Scenario 3.

\n
\n