// Numbas version: exam_results_page_options {"name": "Morten's copy of Plotting points on a graph", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"parts": [{"scripts": {}, "gaps": [{"correctAnswerFraction": false, "minValue": "a-0.1", "allowFractions": false, "maxValue": "a+0.1", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showPrecisionHint": false, "marks": 1, "type": "numberentry"}, {"correctAnswerFraction": false, "minValue": "b-0.1", "allowFractions": false, "maxValue": "b+0.1", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showPrecisionHint": false, "marks": 1, "type": "numberentry"}, {"correctAnswerFraction": false, "minValue": "c-0.1", "allowFractions": false, "maxValue": "c+0.1", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showPrecisionHint": false, "marks": 1, "type": "numberentry"}, {"correctAnswerFraction": false, "minValue": "d-0.1", "allowFractions": false, "maxValue": "d+0.1", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showPrecisionHint": false, "marks": 1, "type": "numberentry"}, {"correctAnswerFraction": false, "minValue": "ee-0.1", "allowFractions": false, "maxValue": "ee+0.1", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showPrecisionHint": false, "marks": 1, "type": "numberentry"}, {"correctAnswerFraction": false, "minValue": "f-0.1", "allowFractions": false, "maxValue": "f+0.1", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showPrecisionHint": false, "marks": 1, "type": "numberentry"}, {"correctAnswerFraction": false, "minValue": "g-0.1", "allowFractions": false, "maxValue": "g+0.1", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showPrecisionHint": false, "marks": 1, "type": "numberentry"}, {"correctAnswerFraction": false, "minValue": "h-0.1", "allowFractions": false, "maxValue": "h+0.1", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showPrecisionHint": false, "marks": 1, "type": "numberentry"}], "prompt": "

$A=(\\var{a},\\var{b})$, $\\quad B=(\\var{c},\\var{d})$, $\\quad C=(\\var{ee},\\var{f})\\quad$ and $\\quad D=(\\var{g},\\var{h})$.

\n

{dragpoint()}

\n

", "showCorrectAnswer": true, "marks": 0, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "type": "gapfill"}], "name": "Morten's copy of Plotting points on a graph", "variable_groups": [], "ungrouped_variables": ["a", "b", "c", "d", "ee", "f", "g", "h"], "rulesets": {}, "advice": "

The correct positions of the points are shown in the graph below.

\n

The $x$-coordinate of $A$ is $\\var{a}$, so it is this distance from the origin in the horizontal direction (positive is to the right and negative is to the left).

\n

The $y$-coordinate of $A$ is $\\var{b}$, so it is this distance from the origin in the vertical direction (positive is upwards and negative is downwards).

\n

The $x$-coordinate of $B$ is $\\var{c}$, so it is this distance from the origin in the horizontal direction (positive is to the right and negative is to the left).

\n

The $y$-coordinate of $B$ is $\\var{d}$, so it is this distance from the origin in the vertical direction (positive is upwards and negative is downwards).

\n

The $x$-coordinate of $C$ is $\\var{ee}$, so it is this distance from the origin in the horizontal direction (positive is to the right and negative is to the left).

\n

The $y$-coordinate of $C$ is $\\var{f}$, so it is this distance from the origin in the vertical direction (positive is upwards and negative is downwards).

\n

The $x$-coordinate of $D$ is $\\var{g}$, so it is this distance from the origin in the horizontal direction (positive is to the right and negative is to the left).

\n

The $y$-coordinate of $D$ is $\\var{h}$, so it is this distance from the origin in the vertical direction (positive is upwards and negative is downwards).

\n

{dragpointafter()}

", "preamble": {"css": "", "js": ""}, "question_groups": [{"questions": [], "pickingStrategy": "all-ordered", "name": "", "pickQuestions": 0}], "functions": {"dragpointafter": {"definition": "// set up the board\nvar div = Numbas.extensions.jsxgraph.makeBoard('500px','500px',{boundingBox:[-11,11,11,-11],grid:true,withLabel:true});\n\nvar board = div.board;\n\nvar x1 = Numbas.jme.unwrapValue(scope.variables.a);\nvar y1 = Numbas.jme.unwrapValue(scope.variables.b);\nvar x2 = Numbas.jme.unwrapValue(scope.variables.c);\nvar y2 = Numbas.jme.unwrapValue(scope.variables.d);\nvar x3 = Numbas.jme.unwrapValue(scope.variables.ee);\nvar y3 = Numbas.jme.unwrapValue(scope.variables.f);\nvar x4 = Numbas.jme.unwrapValue(scope.variables.g);\nvar y4 = Numbas.jme.unwrapValue(scope.variables.h);\n\nvar b = board.create('point',[10,0],{size:-1,name:'x'});\nb.setProperty({fixed:true});\nvar c = board.create('point',[0,10],{size:-1,name:'y'});\nc.setProperty({fixed:true});\n\nvar a = board.create('point',[x1,y1],{size:5});\na.setProperty({fixed:true});\nvar b = board.create('point',[x2,y2],{size:5});\nb.setProperty({fixed:true});\nvar c = board.create('point',[x3,y3],{size:5});\nc.setProperty({fixed:true});\nvar d = board.create('point',[x4,y4],{size:5});\nd.setProperty({fixed:true});\n\nreturn div;", "language": "javascript", "type": "html", "parameters": []}, "dragpoint": {"definition": "// set up the board\nvar div = Numbas.extensions.jsxgraph.makeBoard('500px','500px',{boundingBox:[-11,11,11,-11],grid:true,labels:true});\nvar board = div.board;\n\nvar x = Numbas.jme.unwrapValue(scope.variables.a);\nvar y = Numbas.jme.unwrapValue(scope.variables.b);\n\nvar e = board.create('point',[10,0],{size:-1,name:'x'});\ne.setProperty({fixed:true});\nvar f = board.create('point',[0,10],{size:-1,name:'y'});\nf.setProperty({fixed:true});\n\nvar a = board.create('point',[-9,0],{size:5});\nvar b = board.create('point',[-3,0],{size:5});\nvar c = board.create('point',[3,0],{size:5});\nvar d = board.create('point',[9,0],{size:5});\n\na.on('drag',function(){\n var x = Numbas.math.niceNumber(a.X());\n var y = Numbas.math.niceNumber(a.Y());\n Numbas.exam.currentQuestion.parts[0].gaps[0].display.studentAnswer(a.X());\n Numbas.exam.currentQuestion.parts[0].gaps[1].display.studentAnswer(y); \n});\nb.on('drag',function(){\n var x = Numbas.math.niceNumber(b.X());\n var y = Numbas.math.niceNumber(b.Y());\n Numbas.exam.currentQuestion.parts[0].gaps[2].display.studentAnswer(b.X());\n Numbas.exam.currentQuestion.parts[0].gaps[3].display.studentAnswer(y); \n});\nc.on('drag',function(){\n var x = Numbas.math.niceNumber(c.X());\n var y = Numbas.math.niceNumber(c.Y());\n Numbas.exam.currentQuestion.parts[0].gaps[4].display.studentAnswer(c.X());\n Numbas.exam.currentQuestion.parts[0].gaps[5].display.studentAnswer(y); \n});\nd.on('drag',function(){\n var x = Numbas.math.niceNumber(d.X());\n var y = Numbas.math.niceNumber(d.Y());\n Numbas.exam.currentQuestion.parts[0].gaps[6].display.studentAnswer(d.X());\n Numbas.exam.currentQuestion.parts[0].gaps[7].display.studentAnswer(y); \n});\n\nreturn div;\n\n\n", "language": "javascript", "type": "html", "parameters": []}}, "showQuestionGroupNames": false, "variables": {"h": {"templateType": "anything", "definition": "random(-10..10)", "name": "h", "description": "

y-coordinate of the fourth point.

", "group": "Ungrouped variables"}, "g": {"templateType": "anything", "definition": "random(-10..10)", "name": "g", "description": "

x-coordinate of the fourth point.

", "group": "Ungrouped variables"}, "d": {"templateType": "anything", "definition": "random(-10..10)", "name": "d", "description": "

y-coordinate of the second point.

", "group": "Ungrouped variables"}, "f": {"templateType": "anything", "definition": "random(-10..10)", "name": "f", "description": "

y-coordinate of the third point.

", "group": "Ungrouped variables"}, "a": {"templateType": "anything", "definition": "random(-10..10)", "name": "a", "description": "

x-coordinate of the first point.

", "group": "Ungrouped variables"}, "b": {"templateType": "anything", "definition": "random(-10..10)", "name": "b", "description": "

y-coordinate of the first point.

", "group": "Ungrouped variables"}, "ee": {"templateType": "anything", "definition": "random(-10..10)", "name": "ee", "description": "

x-coordinate of the third point.

", "group": "Ungrouped variables"}, "c": {"templateType": "anything", "definition": "random(-10..10)", "name": "c", "description": "

x-coordinate of the second point.

", "group": "Ungrouped variables"}}, "tags": [], "variablesTest": {"condition": "c<>a and ee<>a and g<>a and ee<>c and g<>c and g<>ee and (a<>-9 or b<>0) and (c<>-3 or d<>0) and (ee<>3 or f<>0) and (g<>9 or h<>0) ", "maxRuns": 100}, "statement": "

Place the following points on the graph by dragging them.

\n

Note that to be marked correct, you have to get the x and y coordinates within 0.1 of the asked for values.

", "extensions": ["jsxgraph"], "type": "question", "metadata": {"description": "

This question allows you to practice plotting points on graphs.

", "licence": "Creative Commons Attribution 4.0 International"}, "contributors": [{"name": "Morten Brekke", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/478/"}]}]}], "contributors": [{"name": "Morten Brekke", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/478/"}]}