// Numbas version: exam_results_page_options {"name": "Stimulus: randomisation graphs example", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Stimulus: randomisation graphs example", "tags": [], "metadata": {"description": "", "licence": "None specified"}, "statement": "
A parabola has an equation of the form $y=ax^2+bx+c$, where $a$, $b$ and $c$ are real numbers.
", "advice": "The correct parabola can be found by interpreting the signs of $a$, $b$ and $c$:
\n0: a>0, b>0, c>0
\n1: a>0, b>0, c<0
\n2: a>0, b<0, c>0
\n3: a>0, b<0, c<0
\n4: a<0, b>0, c>0
\n5: a<0, b>0, c<0
\n6: a<0, b<0, c>0
\n7: a<0, b<0, c<0
", "templateType": "anything", "can_override": false}, "coefficients": {"name": "coefficients", "group": "Ungrouped variables", "definition": "[[1,4,1],[0.5,2,-1],[2,-2,2],[0.3,-1.2,-2],[-0.5,2.5,1],[-0.5,2,-2],[-1,-2.8,2],[-2,-4,-3]]", "description": "", "templateType": "anything", "can_override": false}, "score": {"name": "score", "group": "Ungrouped variables", "definition": "[switch(pick_coefficients=0,1,0),switch(pick_coefficients=1,1,0),switch(pick_coefficients=2,1,0),switch(pick_coefficients=3,1,0),switch(pick_coefficients=4,1,0),switch(pick_coefficients=5,1,0),switch(pick_coefficients=6,1,0),switch(pick_coefficients=7,1,0)]", "description": "", "templateType": "anything", "can_override": false}, "case_b": {"name": "case_b", "group": "Ungrouped variables", "definition": "[expression('b>0'),expression('b<0')]", "description": "", "templateType": "anything", "can_override": false}, "pick_b": {"name": "pick_b", "group": "Ungrouped variables", "definition": "random(0,1)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["case_a", "case_b", "case_c", "pick_a", "pick_b", "pick_c", "pick_coefficients", "coefficients", "score"], "variable_groups": [], "functions": {"drawParabola": {"parameters": [["a", "number"], ["b", "number"], ["c", "number"]], "type": "html", "language": "javascript", "definition": "// Max and min x and y values for the axis.\nvar x_min = -5;\nvar x_max = 5;\nvar y_min = -5;\nvar y_max = 5;\n \nvar div = Numbas.extensions.jsxgraph.makeBoard(\n '200px','200px',\n {boundingBox:[x_min,y_max,x_max,y_min],\n grid:false,\n axis:false});\nvar board = div.board;\n \n// create the x-axis.\nvar xaxis = board.create('line',[[0,0],[1,0]],\n {lastarrow:true,\n name:'X',\n withLabel:true,\n label: {position: 'rt',offset: [0, 10]},\n strokeColor: 'black',\n fixed: true});\n \n// create the y-axis\nvar yaxis = board.create('line',[[0,0],[0,1]],\n {lastarrow:true,\n name:'Y',\n withLabel:true,\n label: {position: 'rt',offset: [5, 0]},\n strokeColor: 'black',\n fixed: true });\n \n//definieer kwadratische functie\nvar f = function(x) {return a*x*x+b*x+c;}\n \n//plot functie\nvar g = board.create('functiongraph', [f], {strokeColor: 'black'});\n \nreturn div;\n"}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "For which of the parabolas shown is the equation such that $\\var{case_a[pick_a]}$, $\\var{case_b[pick_b]}$ and $\\var{case_c[pick_c]}$?
", "minMarks": 0, "maxMarks": 0, "shuffleChoices": true, "displayType": "radiogroup", "displayColumns": "4", "showCellAnswerState": true, "choices": ["{drawParabola(coefficients[0][0],coefficients[0][1],coefficients[0][2])}", "{drawParabola(coefficients[1][0],coefficients[1][1],coefficients[1][2])}", "{drawParabola(coefficients[2][0],coefficients[2][1],coefficients[2][2])}", "{drawParabola(coefficients[4][0],coefficients[4][1],coefficients[4][2])}", "{drawParabola(coefficients[6][0],coefficients[6][1],coefficients[6][2])}", "{drawParabola(coefficients[7][0],coefficients[7][1],coefficients[7][2])}", "{drawParabola(coefficients[3][0],coefficients[3][1],coefficients[3][2])}", "{drawParabola(coefficients[5][0],coefficients[5][1],coefficients[5][2])}"], "matrix": ["{score[0]}", "{score[1]}", "{score[2]}", "{score[4]}", "{score[6]}", "{score[7]}", "{score[3]}", "{score[5]}"], "distractors": ["", "", "", "", "", "", "", ""]}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Eric Boeckx", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3901/"}, {"name": "Alexander Holvoet", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/19859/"}]}]}], "contributors": [{"name": "Eric Boeckx", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3901/"}, {"name": "Alexander Holvoet", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/19859/"}]}