// Numbas version: exam_results_page_options {"name": "Ed's copy of Conditional visibility", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"showQuestionGroupNames": false, "rulesets": {}, "type": "question", "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"}, "variable_groups": [{"variables": ["scenario"], "name": "Scenario"}, {"variables": ["a", "b", "c"], "name": "Quadratic equation"}], "name": "Ed's copy of Conditional visibility", "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

\n

\\[ \\simplify{{a}x^2+{b}x+{c} = 0} \\]

\n

The discriminant of this equation is \$\\simplify[!basic]{{b}^2-4*{a}*{c}} = \\var{b^2-4*a*c}\$. This is greater than zero, so the equation has two real roots. As this is zero, the equation has one repeated root. This is less than zero, so the equation has no real roots.

", "functions": {}, "variablesTest": {"maxRuns": 100, "condition": ""}, "ungrouped_variables": [], "tags": ["conditional visibility", "demo"], "variables": {"scenario": {"group": "Scenario", "templateType": "anything", "description": "

Choose between three scenarios.

", "name": "scenario", "definition": "random(1,2,3)"}, "c": {"group": "Quadratic equation", "templateType": "anything", "description": "", "name": "c", "definition": "random(-4..4 except 0)"}, "a": {"group": "Quadratic equation", "templateType": "anything", "description": "", "name": "a", "definition": "random(1..3)"}, "b": {"group": "Quadratic equation", "templateType": "anything", "description": "", "name": "b", "definition": "random(-6..6 except 0)"}}, "advice": "", "preamble": {"css": "", "js": ""}, "question_groups": [{"pickQuestions": 0, "questions": [], "name": "", "pickingStrategy": "all-ordered"}], "parts": [], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Ed Southwood", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2415/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Ed Southwood", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2415/"}]}