// Numbas version: exam_results_page_options {"name": "Student Grades Question 2", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"metadata": {"description": "

Widget Sales

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "functions": {}, "variable_groups": [], "preamble": {"css": "table#values th {\n background: none;\n text-align: center;\n}", "js": "function dragpoint_board() {\n var scope = question.scope;\n \n JXG.Options.text.display = 'internal';\n\n var yo0 = scope.variables.yo0.value;\n var yo1 = scope.variables.yo1.value;\n var yo2 = scope.variables.yo2.value;\n var yo3 = scope.variables.yo3.value; \n var yo4 = scope.variables.yo4.value;\n var yo5 = scope.variables.yo5.value;\n var yo6 = scope.variables.yo6.value;\n \n var maxx = scope.variables.maxx.value;\n var maxy = scope.variables.maxy.value;\n \n var div = Numbas.extensions.jsxgraph.makeBoard('500px','500px',{boundingBox:[-0.6,105,8,-4], axis:false, grid:false});\n \n \n $(question.display.html).find('#dragpoint').append(div);\n \n var board = div.board;\n \n var xaxis = board.create('axis', [[0, 0], [7, 0]], {withLabel: true, name: \"Year\", label: {offset: [250,-28]}});\n \n xaxis.removeAllTicks();\n \n board.create('axis', [[0, 0], [0, 20]], {hideTicks:true, withLabel: false, name: \"Percentage\", label: {offset: [-90,300]}});\n \n //create stationary points\n \n var op0 = board.create('point',[1,yo0],{name:'',fixed:true,size:3,color:'blue',face:'diamond'});\n var op1 = board.create('point',[2,yo1],{name:'',fixed:true,size:3,color:'blue',face:'diamond'});\n var op2 = board.create('point',[3,yo2],{name:'',fixed:true,size:3,color:'blue',face:'diamond'});\n var op3 = board.create('point',[4,yo3],{name:'',fixed:true,size:3,color:'blue',face:'diamond'});\n var op4 = board.create('point',[5,yo4],{name:'',fixed:true,size:3,color:'blue',face:'diamond'});\n var op5 = board.create('point',[6,yo5],{name:'',fixed:true,size:3,color:'blue',face:'diamond'});\n var op6 = board.create('point',[7,yo6],{name:'',fixed:true,size:3,color:'blue',face:'diamond'});\n \n \n var pop0 = board.create('point', [1,0],{name:'2007',fixed:true,size:0,color:'black',face:'diamond', label:{offset:[-20,-8]}});\n var pop1 = board.create('point',[2,0],{name:'2008',fixed:true,size:0,color:'black',face:'diamond', label:{offset:[-20,-8]}});\n var pop2 = board.create('point',[3,0],{name:'2009',fixed:true,size:0,color:'black', face:'diamond', label:{offset:[-15,-8]}});\n var pop3 = board.create('point',[4,0],{name:'2010',fixed:true,size:0,color:'black', face:'diamond', label:{offset:[-15,-8]}});\n var pop4 = board.create('point',[5,0],{name:'2011',fixed:true,size:0,color:'black', face:'diamond', label:{offset:[-10,-8]}});\n var pop5 = board.create('point',[6,0],{name:'2012',fixed:true,size:0,color:'black', face:'diamond', label:{offset:[-15,-8]}});\n var pop6 = board.create('point',[7,0],{name:'2013',fixed:true,size:0,color:'black', face:'diamond', label:{offset:[-15,-8]}});\n \n // create the parabola\n var parabool1 = board.create('line',[[x1=1,y1=yo0], [x2=2,y2=yo1]],{straightFirst:false, straightLast:false,strokeWidth:1,strokeColor:'blue'});\n var parabool2 = board.create('line',[[x1=2,y1=yo1], [x2=3,y2=yo2]],{straightFirst:false, straightLast:false,strokeWidth:1,strokeColor:'blue'});\n var parabool3 = board.create('line',[[x1=3,y1=yo2], [x2=4,y2=yo3]],{straightFirst:false, straightLast:false,strokeWidth:1,strokeColor:'blue'});\n var parabool4 = board.create('line',[[x1=4,y1=yo3], [x2=5,y2=yo4]],{straightFirst:false, straightLast:false,strokeWidth:1,strokeColor:'blue'});\n var parabool5 = board.create('line',[[x1=5,y1=yo4], [x2=6,y2=yo5]],{straightFirst:false, straightLast:false,strokeWidth:1,strokeColor:'blue'});\n var parabool5 = board.create('line',[[x1=6,y1=yo5], [x2=7,y2=yo6]],{straightFirst:false, straightLast:false,strokeWidth:1,strokeColor:'blue'});\n \n var txt = board.create('text',[-0.35,42, 'Percentage'], {fontSize:14, rotate:90});\n \n}\n\nquestion.signals.on('HTMLAttached',function() {\n dragpoint_board();\n});"}, "ungrouped_variables": ["selector", "vsh", "hsh", "vsc", "hsc", "yo", "yn", "xo", "xn", "yo0", "yo1", "yo2", "yo3", "yo4", "maxx", "maxy", "yo01", "yo11", "yo21", "yo31", "yo41", "yo5", "yo51", "maxvector", "a", "b", "c", "d", "eee", "f", "answer", "fakeanswer1", "fakeanswer2", "fakeanswer3", "fakeanswer4", "aa", "bb", "cc", "dd", "percent", "students", "yo6", "yearvector", "ii", "year", "gradevector", "increase", "n1", "n2", "n3", "n4", "n5", "n6", "n7", "m", "p"], "extensions": ["jsxgraph"], "variablesTest": {"maxRuns": 100, "condition": ""}, "name": "Student Grades Question 2", "statement": "", "advice": "", "rulesets": {"std": ["all", "fractionNumbers"]}, "tags": [], "variables": {"yo5": {"name": "yo5", "group": "Ungrouped variables", "templateType": "anything", "definition": "5*n6", "description": ""}, "percent": {"name": "percent", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(5..20#0.1 except 5 except 6 except 7 except 8 except 9 except 10 except 11 except 12 except 13 except 14 except 15 except 16 except 17 except 18 except 19 except 20)", "description": ""}, "cc": {"name": "cc", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(0.7..1.3#0.01 except 1 except aa except bb)", "description": ""}, "yn": {"name": "yn", "group": "Ungrouped variables", "templateType": "anything", "definition": "map(vsc*y+vsh,y,yo)", "description": "

new y values after the transformation

"}, "yo31": {"name": "yo31", "group": "Ungrouped variables", "templateType": "anything", "definition": "c*yo3", "description": ""}, "b": {"name": "b", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(1.1..1.3#0.01 except a)", "description": ""}, "m": {"name": "m", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(20..40)", "description": ""}, "students": {"name": "students", "group": "Ungrouped variables", "templateType": "anything", "definition": "20*m", "description": ""}, "yo51": {"name": "yo51", "group": "Ungrouped variables", "templateType": "anything", "definition": "eee*yo5", "description": ""}, "yo2": {"name": "yo2", "group": "Ungrouped variables", "templateType": "anything", "definition": "5*n3", "description": ""}, "selector": {"name": "selector", "group": "Ungrouped variables", "templateType": "anything", "definition": "'vsc'", "description": ""}, "d": {"name": "d", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(1.1..1.3#0.01 except a except b except c)", "description": ""}, "c": {"name": "c", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(1.1..1.3#0.01 except a except b)", "description": ""}, "yo21": {"name": "yo21", "group": "Ungrouped variables", "templateType": "anything", "definition": "b*yo2", "description": ""}, "n5": {"name": "n5", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(5..18 except[n1,n2,n3,n4])", "description": ""}, "p": {"name": "p", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..4)", "description": ""}, "vsc": {"name": "vsc", "group": "Ungrouped variables", "templateType": "anything", "definition": "if(selector='vsc',random(-2,-1,-0.5,0.5,2),1)", "description": ""}, "dd": {"name": "dd", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(0.7..1.3#0.01 except 1 except aa except bb except cc)", "description": ""}, "xn": {"name": "xn", "group": "Ungrouped variables", "templateType": "anything", "definition": "map((x-hsh)/hsc,x,xo)", "description": "

new transformed x values

"}, "eee": {"name": "eee", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(1.1..1.3#0.01 except a except b except c except d)", "description": ""}, "fakeanswer3": {"name": "fakeanswer3", "group": "Ungrouped variables", "templateType": "anything", "definition": "siground(cc*answer,3)", "description": ""}, "yo0": {"name": "yo0", "group": "Ungrouped variables", "templateType": "anything", "definition": "5*n1", "description": ""}, "n7": {"name": "n7", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(5..18 except[n1,n2,n3,n4,n5,n6])", "description": ""}, "a": {"name": "a", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(1.1..1.3#0.01)", "description": ""}, "maxx": {"name": "maxx", "group": "Ungrouped variables", "templateType": "anything", "definition": "max(map(abs(a),a,xn)+5)+1", "description": ""}, "n2": {"name": "n2", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(5..18 except[n1])", "description": ""}, "bb": {"name": "bb", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(0.7..1.3#0.01 except 1 except aa)", "description": ""}, "yo3": {"name": "yo3", "group": "Ungrouped variables", "templateType": "anything", "definition": "5*n4", "description": ""}, "aa": {"name": "aa", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(0.7..1.3#0.01 except 1)", "description": ""}, "f": {"name": "f", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(1.1..1.3#0.01 except a except b except c except d except e)", "description": ""}, "maxvector": {"name": "maxvector", "group": "Ungrouped variables", "templateType": "anything", "definition": "vector(yo1, yo2,yo3, yo4, yo5, yo11, yo21,yo31, yo41, yo51)", "description": ""}, "year": {"name": "year", "group": "Ungrouped variables", "templateType": "anything", "definition": "yearvector[ii]", "description": ""}, "answer": {"name": "answer", "group": "Ungrouped variables", "templateType": "anything", "definition": "(students+ii*increase)*gradevector[ii]/100", "description": ""}, "n1": {"name": "n1", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(5..18)", "description": ""}, "yo6": {"name": "yo6", "group": "Ungrouped variables", "templateType": "anything", "definition": "5*n7", "description": ""}, "fakeanswer2": {"name": "fakeanswer2", "group": "Ungrouped variables", "templateType": "anything", "definition": "siground(bb*answer,3)", "description": ""}, "fakeanswer1": {"name": "fakeanswer1", "group": "Ungrouped variables", "templateType": "anything", "definition": "siground(aa*answer,3)", "description": ""}, "yo4": {"name": "yo4", "group": "Ungrouped variables", "templateType": "anything", "definition": "5*n5", "description": ""}, "xo": {"name": "xo", "group": "Ungrouped variables", "templateType": "anything", "definition": "list(-2..2)", "description": "

original x values

"}, "maxy": {"name": "maxy", "group": "Ungrouped variables", "templateType": "anything", "definition": "max(list(maxvector)) + 1", "description": ""}, "yo1": {"name": "yo1", "group": "Ungrouped variables", "templateType": "anything", "definition": "5*n2", "description": ""}, "hsc": {"name": "hsc", "group": "Ungrouped variables", "templateType": "anything", "definition": "if(selector='hsc',random(-2,-1,-0.5,0.5,2),1)", "description": ""}, "fakeanswer4": {"name": "fakeanswer4", "group": "Ungrouped variables", "templateType": "anything", "definition": "siground(dd*answer,3)", "description": ""}, "n3": {"name": "n3", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(5..18 except[n1,n2])", "description": ""}, "gradevector": {"name": "gradevector", "group": "Ungrouped variables", "templateType": "anything", "definition": "vector(yo0, yo1,yo2,yo3, yo4, yo5, yo6)", "description": ""}, "ii": {"name": "ii", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(3..6#1)", "description": ""}, "n4": {"name": "n4", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(5..18 except[n1,n2,n3])", "description": ""}, "yo": {"name": "yo", "group": "Ungrouped variables", "templateType": "anything", "definition": "repeat(random(-5..5),5)", "description": "

the (random) original y values which relate to the x values

"}, "n6": {"name": "n6", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(5..18 except[n1,n2,n3,n4,n5])", "description": ""}, "increase": {"name": "increase", "group": "Ungrouped variables", "templateType": "anything", "definition": "20*p", "description": ""}, "yo11": {"name": "yo11", "group": "Ungrouped variables", "templateType": "anything", "definition": "a*yo1", "description": ""}, "hsh": {"name": "hsh", "group": "Ungrouped variables", "templateType": "anything", "definition": "if(selector='hsh',random(-3..3 except 0),0)", "description": "

horizontal shift

"}, "yo41": {"name": "yo41", "group": "Ungrouped variables", "templateType": "anything", "definition": "d*yo4", "description": ""}, "yearvector": {"name": "yearvector", "group": "Ungrouped variables", "templateType": "anything", "definition": "vector(2007,2008,2009,2010,2011,2012,2013)", "description": ""}, "yo01": {"name": "yo01", "group": "Ungrouped variables", "templateType": "anything", "definition": "f*yo0", "description": ""}, "vsh": {"name": "vsh", "group": "Ungrouped variables", "templateType": "anything", "definition": "if(selector='vsh',random(-3..3#0.5 except 0),0)\n", "description": "

vertical shift

"}}, "parts": [{"choices": ["

{answer} students         

", "

{fakeanswer1} students          

", "

{fakeanswer2} students          

", "

{fakeanswer3} students          

", "

{fakeanswer4} students          

"], "type": "1_n_2", "marks": 0, "displayType": "radiogroup", "variableReplacementStrategy": "originalfirst", "matrix": ["1", 0, 0, 0, 0], "variableReplacements": [], "showCorrectAnswer": true, "prompt": "
Student Pass Rate for Module Z
\n

\n

If there were {students} students on Module Z in 2007 and the numbers went up every year by {increase}, how many students passed the module in {year}?

", "shuffleChoices": true, "maxMarks": 0, "displayColumns": 0, "distractors": ["", "", "", "", ""], "showFeedbackIcon": true, "minMarks": 0, "scripts": {}}], "type": "question", "contributors": [{"name": "Gareth Woods", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/978/"}]}]}], "contributors": [{"name": "Gareth Woods", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/978/"}]}