// Numbas version: exam_results_page_options {"name": "Johan's copy of Conditional visibility", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"ungrouped_variables": [], "variablesTest": {"condition": "", "maxRuns": 100}, "type": "question", "tags": ["conditional visibility", "demo"], "showQuestionGroupNames": false, "advice": "", "functions": {}, "statement": "
First, this question picks between three scenarios.
\nThis is Scenario 1.
\nThis is Scenario 2.
\nThis is Scenario 3.
\nNow, consider the quadratic equation
\n\\[ \\simplify{{a}x^2+{b}x+{c} = 0} \\]
\nThe 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.
", "rulesets": {}, "variables": {"b": {"definition": "random(-6..6 except 0)", "templateType": "anything", "description": "", "group": "Quadratic equation", "name": "b"}, "a": {"definition": "random(1..3)", "templateType": "anything", "description": "", "group": "Quadratic equation", "name": "a"}, "scenario": {"definition": "random(1,2,3)", "templateType": "anything", "description": "Choose between three scenarios.
", "group": "Scenario", "name": "scenario"}, "c": {"definition": "random(-4..4 except 0)", "templateType": "anything", "description": "", "group": "Quadratic equation", "name": "c"}}, "metadata": {"notes": "", "licence": "Creative Commons Attribution 4.0 International", "description": "Show one of several blocks of text depending on the value of a question variable.
\nAs 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.
"}, "name": "Johan's copy of Conditional visibility", "question_groups": [{"pickQuestions": 0, "pickingStrategy": "all-ordered", "questions": [], "name": ""}], "parts": [], "variable_groups": [{"variables": ["scenario"], "name": "Scenario"}, {"variables": ["a", "b", "c"], "name": "Quadratic equation"}], "preamble": {"css": "", "js": ""}, "contributors": [{"name": "Johan Maertens", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1301/"}]}]}], "contributors": [{"name": "Johan Maertens", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1301/"}]}