// Numbas version: exam_results_page_options {"name": "Adrian's copy of Conditional visibility", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [{"variables": ["scenario"], "name": "Scenario"}, {"variables": ["a", "b", "c"], "name": "Quadratic equation"}], "advice": "", "functions": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "metadata": {"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.

", "notes": "", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "preamble": {"css": "", "js": ""}, "tags": ["conditional visibility", "demo"], "showQuestionGroupNames": false, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "parts": [], "ungrouped_variables": [], "variables": {"b": {"definition": "random(-6..6 except 0)", "group": "Quadratic equation", "templateType": "anything", "description": "", "name": "b"}, "c": {"definition": "random(-4..4 except 0)", "group": "Quadratic equation", "templateType": "anything", "description": "", "name": "c"}, "a": {"definition": "random(1..3)", "group": "Quadratic equation", "templateType": "anything", "description": "", "name": "a"}, "scenario": {"definition": "random(1,2,3)", "group": "Scenario", "templateType": "anything", "description": "

Choose between three scenarios.

", "name": "scenario"}}, "name": "Adrian's copy of Conditional visibility", "rulesets": {}, "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