// Numbas version: exam_results_page_options {"name": "Student Grades Question 1", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"rulesets": {"std": ["all", "fractionNumbers"]}, "statement": "", "metadata": {"licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International", "description": "

Widget Sales

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

{answer} students         

", "

{fakeanswer1} students          

", "

{fakeanswer2} students          

", "

{fakeanswer3} students          

", "

{fakeanswer4} students          

"], "variableReplacementStrategy": "originalfirst", "maxMarks": 0, "showFeedbackIcon": true, "scripts": {}, "prompt": "
Student Pass Rate for Module Z
\n

\n

If there were {students} students on Module Z in {year} how many failed the module in that year?

", "minMarks": 0, "matrix": ["1", 0, 0, 0, 0], "showCorrectAnswer": true, "type": "1_n_2", "variableReplacements": [], "displayType": "radiogroup", "shuffleChoices": true, "distractors": ["", "", "", "", ""], "displayColumns": 0}], "extensions": ["jsxgraph"], "variable_groups": [], "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", "m", "n1", "n2", "n3", "n4", "n5", "n6", "n7"], "name": "Student Grades Question 1", "tags": [], "functions": {}, "advice": "", "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});"}, "variablesTest": {"condition": "fakeanswer2>0", "maxRuns": 100}, "variables": {"yo41": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "yo41", "definition": "d*yo4"}, "gradevector": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "gradevector", "definition": "vector(yo0, yo1,yo2,yo3, yo4, yo5, yo6)"}, "yo0": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "yo0", "definition": "5*n1"}, "dd": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "dd", "definition": "random(0.7..1.3#0.01 except 1 except aa except bb except cc)"}, "n5": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "n5", "definition": "random(10..18 except [n1,n2,n3,n4])"}, "yo31": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "yo31", "definition": "c*yo3"}, "n1": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "n1", "definition": "random(10..18)"}, "b": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "b", "definition": "random(1.1..1.3#0.01 except a)"}, "n7": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "n7", "definition": "random(10..18 except [n1,n2,n3,n4,n5,n6])"}, "d": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "d", "definition": "random(1.1..1.3#0.01 except a except b except c)"}, "fakeanswer3": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "fakeanswer3", "definition": "answer + 5"}, "answer": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "answer", "definition": "(100-gradevector[ii])/100*students"}, "students": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "students", "definition": "20*m"}, "n4": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "n4", "definition": "random(10..18 except [n1,n2,n3])"}, "yo6": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "yo6", "definition": "5*n7"}, "ii": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "ii", "definition": "random(0..6#1)"}, "selector": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "selector", "definition": "'vsc'"}, "n6": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "n6", "definition": "random(10..18 except [n1,n2,n3,n4,n5])"}, "c": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "c", "definition": "random(1.1..1.3#0.01 except a except b)"}, "maxx": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "maxx", "definition": "max(map(abs(a),a,xn)+5)+1"}, "vsh": {"templateType": "anything", "group": "Ungrouped variables", "description": "

vertical shift

", "name": "vsh", "definition": "if(selector='vsh',random(-3..3#0.5 except 0),0)\n"}, "maxy": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "maxy", "definition": "max(list(maxvector)) + 1"}, "aa": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "aa", "definition": "random(0.7..1.3#0.01 except 1)"}, "yo21": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "yo21", "definition": "b*yo2"}, "eee": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "eee", "definition": "random(1.1..1.3#0.01 except a except b except c except d)"}, "yo51": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "yo51", "definition": "eee*yo5"}, "yo5": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "yo5", "definition": "5*n6"}, "bb": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "bb", "definition": "random(0.7..1.3#0.01 except 1 except aa)"}, "m": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "m", "definition": "random(10..30)"}, "hsc": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "hsc", "definition": "if(selector='hsc',random(-2,-1,-0.5,0.5,2),1)"}, "yo3": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "yo3", "definition": "5*n4"}, "n3": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "n3", "definition": "random(10..18 except [n1,n2])"}, "xn": {"templateType": "anything", "group": "Ungrouped variables", "description": "

new transformed x values

", "name": "xn", "definition": "map((x-hsh)/hsc,x,xo)"}, "yo2": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "yo2", "definition": "5*n3"}, "yo11": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "yo11", "definition": "a*yo1"}, "n2": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "n2", "definition": "random(10..18 except n1)"}, "yo01": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "yo01", "definition": "f*yo0"}, "year": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "year", "definition": "yearvector[ii]"}, "xo": {"templateType": "anything", "group": "Ungrouped variables", "description": "

original x values

", "name": "xo", "definition": "list(-2..2)"}, "percent": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "percent", "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)"}, "hsh": {"templateType": "anything", "group": "Ungrouped variables", "description": "

horizontal shift

", "name": "hsh", "definition": "if(selector='hsh',random(-3..3 except 0),0)"}, "fakeanswer4": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "fakeanswer4", "definition": "answer + 1"}, "yearvector": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "yearvector", "definition": "vector(2007,2008,2009,2010,2011,2012,2013)"}, "a": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "a", "definition": "random(1.1..1.3#0.01)"}, "fakeanswer2": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "fakeanswer2", "definition": "answer+8"}, "fakeanswer1": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "fakeanswer1", "definition": "answer + 3"}, "yn": {"templateType": "anything", "group": "Ungrouped variables", "description": "

new y values after the transformation

", "name": "yn", "definition": "map(vsc*y+vsh,y,yo)"}, "yo4": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "yo4", "definition": "5*n5"}, "yo1": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "yo1", "definition": "5*n2"}, "f": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "f", "definition": "random(1.1..1.3#0.01 except a except b except c except d except e)"}, "maxvector": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "maxvector", "definition": "vector(yo1, yo2,yo3, yo4, yo5, yo11, yo21,yo31, yo41, yo51)"}, "vsc": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "vsc", "definition": "if(selector='vsc',random(-2,-1,-0.5,0.5,2),1)"}, "cc": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "cc", "definition": "random(0.7..1.3#0.01 except 1 except aa except bb)"}, "yo": {"templateType": "anything", "group": "Ungrouped variables", "description": "

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

", "name": "yo", "definition": "repeat(random(-5..5),5)"}}, "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/"}]}