// Numbas version: exam_results_page_options {"name": "Placing points on a number line", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Placing points on a number line", "statement": "

Place the following points at the given positions on the number line by dragging them.

\n

To be marked correct you have to get the point within 0.1 of the correct position (in the horizontal direction, the vertical position doesn't matter).

", "advice": "

The correct positions of the points are shown on the number line below.

\n

{dragpointafter()}

", "parts": [{"showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "customMarkingAlgorithm": "", "prompt": "

$A=\\var{a}$, $B=\\var{b}$, $C=\\var{c}$ and $D=\\var{d}$.

\n

{dragpoint()}

", "type": "gapfill", "unitTests": [], "sortAnswers": false, "marks": 0, "gaps": [{"showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "minValue": "a-0.1", "mustBeReducedPC": 0, "customMarkingAlgorithm": "", "correctAnswerFraction": false, "maxValue": "a+0.1", "allowFractions": false, "notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "type": "numberentry", "unitTests": [], "marks": 1, "correctAnswerStyle": "plain"}, {"showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "minValue": "b-0.1", "mustBeReducedPC": 0, "customMarkingAlgorithm": "", "correctAnswerFraction": false, "maxValue": "b+0.1", "allowFractions": false, "notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "type": "numberentry", "unitTests": [], "marks": 1, "correctAnswerStyle": "plain"}, {"showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "minValue": "c-0.1", "mustBeReducedPC": 0, "customMarkingAlgorithm": "", "correctAnswerFraction": false, "maxValue": "c+0.1", "allowFractions": false, "notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "type": "numberentry", "unitTests": [], "marks": 1, "correctAnswerStyle": "plain"}, {"showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "minValue": "d-0.1", "mustBeReducedPC": 0, "customMarkingAlgorithm": "", "correctAnswerFraction": false, "maxValue": "d+0.1", "allowFractions": false, "notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "type": "numberentry", "unitTests": [], "marks": 1, "correctAnswerStyle": "plain"}]}], "ungrouped_variables": ["a", "b", "c", "d"], "variablesTest": {"condition": "abs(a-b)>=1 and abs(a-c)>=1 and abs(a-d)>=1 and abs(b-c)>=1 and abs(b-d)>=1 and abs(c-d)>=1", "maxRuns": 100}, "extensions": ["jsxgraph"], "variables": {"b": {"definition": "random(-10..10#0.1)", "name": "b", "description": "", "group": "Ungrouped variables", "templateType": "randrange"}, "d": {"definition": "random(-10..10#0.1)", "name": "d", "description": "", "group": "Ungrouped variables", "templateType": "randrange"}, "a": {"definition": "random(-10..10#0.1)", "name": "a", "description": "", "group": "Ungrouped variables", "templateType": "randrange"}, "c": {"definition": "random(-10..10#0.1)", "name": "c", "description": "", "group": "Ungrouped variables", "templateType": "randrange"}}, "preamble": {"js": "", "css": ""}, "rulesets": {}, "metadata": {"description": "

This question allows you to practice placing points on a number line.

", "licence": "Creative Commons Attribution 4.0 International"}, "functions": {"dragpoint": {"definition": "// set up the board\nvar div = Numbas.extensions.jsxgraph.makeBoard('500px','150px',{boundingBox:[-11,1.5,11,-1.5],axis:false,showNavigation:false});\nvar board = div.board;\n\nvar ax1 = board.create('line', [[0,0],[1,0]]);\nboard.create('ticks',[ax1, 2], {minorTicks:1, majorHeight:20, minorHeight:10, tickEndings:[0,1], drawZero:true, drawLabels:true, label:{offset:[-4, -20]}});\nax1.setProperty({fixed:true});\n\nvar w = Numbas.jme.unwrapValue(scope.variables.a);\nvar x = Numbas.jme.unwrapValue(scope.variables.b);\nvar y = Numbas.jme.unwrapValue(scope.variables.c);\nvar z = Numbas.jme.unwrapValue(scope.variables.d);\n\nvar a = board.create('point',[-9,1],{size:5});\nvar b = board.create('point',[-3,1],{size:5});\nvar c = board.create('point',[3,1],{size:5});\nvar d = board.create('point',[9,1],{size:5});\n\na.on('drag',function(){\n Numbas.exam.currentQuestion.parts[0].gaps[0].display.studentAnswer(a.X()); \n});\n\nb.on('drag',function(){\n Numbas.exam.currentQuestion.parts[0].gaps[1].display.studentAnswer(b.X()); \n});\n\nc.on('drag',function(){\n Numbas.exam.currentQuestion.parts[0].gaps[2].display.studentAnswer(c.X()); \n});\n\nd.on('drag',function(){\n Numbas.exam.currentQuestion.parts[0].gaps[3].display.studentAnswer(d.X()); \n});\n\nreturn div;", "parameters": [], "language": "javascript", "type": "html"}, "dragpointafter": {"definition": "// set up the board\nvar div = Numbas.extensions.jsxgraph.makeBoard('500px','75px',{boundingBox:[-11,0.75,11,-1],axis:false,showNavigation:false});\nvar board = div.board;\n\nvar ax1 = board.create('line', [[0,0],[1,0]]);\nboard.create('ticks',[ax1, 2], {minorTicks:1, majorHeight:20, minorHeight:10, tickEndings:[0,1], drawZero:true, drawLabels:true, label:{offset:[-4, -20]}});\nax1.setProperty({fixed:true});\n\nvar w = Numbas.jme.unwrapValue(scope.variables.a);\nvar x = Numbas.jme.unwrapValue(scope.variables.b);\nvar y = Numbas.jme.unwrapValue(scope.variables.c);\nvar z = Numbas.jme.unwrapValue(scope.variables.d);\n\nvar a = board.create('point',[w,0],{size:5});\na.setProperty({fixed:true});\nvar b = board.create('point',[x,0],{size:5});\nb.setProperty({fixed:true});\nvar c = board.create('point',[y,0],{size:5});\nc.setProperty({fixed:true});\nvar d = board.create('point',[z,0],{size:5});\nd.setProperty({fixed:true});\n\nreturn div;", "parameters": [], "language": "javascript", "type": "html"}}, "tags": [], "variable_groups": [], "type": "question", "contributors": [{"name": "Anthony Brown", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/799/"}]}]}], "contributors": [{"name": "Anthony Brown", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/799/"}]}