// Numbas version: exam_results_page_options {"name": "AP's copy of prueba --- gr\u00e1fico", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "ungrouped_variables": ["a", "c", "values"], "name": "AP's copy of prueba --- gr\u00e1fico", "tags": ["graph", "interactive", "JSXgraph", "Jsxgraph", "jsxgraph", "plot", "quadratic"], "advice": "", "rulesets": {"std": ["all", "fractionNumbers"]}, "parts": [{"prompt": "

The graph of this function is:

", "matrix": ["if(a>0,1,0)", "if(a>0,0,1)"], "shuffleChoices": false, "marks": 0, "variableReplacements": [], "choices": ["

An upwards-opening parabola

", "

A downwards-opening parabola

"], "variableReplacementStrategy": "originalfirst", "displayType": "radiogroup", "maxMarks": 1, "scripts": {}, "distractors": ["", ""], "displayColumns": 0, "showCorrectAnswer": true, "type": "1_n_2", "minMarks": 0}, {"prompt": "

Fill in the table of values for $y=\\simplify[std]{{a}x^2+{c}x}$:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$x$$0$$1$$2$$3$$4$$5$$6$
$y$[[0]][[1]][[2]][[3]][[4]][[5]][[6]]
", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": false, "variableReplacements": [], "maxValue": "{a}*9+{c}", "minValue": "{a}*9+{c}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 0.5, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "variableReplacements": [], "maxValue": "{a}*4+{c}", "minValue": "{a}*4+{c}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 0.5, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "variableReplacements": [], "maxValue": "{a}*1+{c}", "minValue": "{a}*1+{c}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 0.5, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "variableReplacements": [], "maxValue": "{c}", "minValue": "{c}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 0.5, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "variableReplacements": [], "maxValue": "{a}*1+{c}", "minValue": "{a}*1+{c}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 0.5, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "variableReplacements": [], "maxValue": "{a}*4+{c}", "minValue": "{a}*4+{c}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 0.5, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "variableReplacements": [], "maxValue": "{a}*9+{c}", "minValue": "{a}*9+{c}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 0.5, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}, {"prompt": "
\n

Slide the points to the correct $y$ values.

\n

\n

\n

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": false, "variableReplacements": [], "maxValue": "{values[0]}", "minValue": "{values[0]}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": false, "scripts": {}, "marks": "0.5", "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "variableReplacements": [], "maxValue": "{values[1]}", "minValue": "{values[1]}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": false, "scripts": {}, "marks": "0.5", "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "variableReplacements": [], "maxValue": "{values[2]}", "minValue": "{values[2]}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": false, "scripts": {}, "marks": "0.5", "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "variableReplacements": [], "maxValue": "{values[3]}", "minValue": "{values[3]}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": false, "scripts": {}, "marks": "0.5", "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "variableReplacements": [], "maxValue": "{values[4]}", "minValue": "{values[4]}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": false, "scripts": {}, "marks": "0.5", "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "variableReplacements": [], "maxValue": "{values[5]}", "minValue": "{values[5]}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": false, "scripts": {}, "marks": "0.5", "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "variableReplacements": [], "maxValue": "{values[6]}", "minValue": "{values[6]}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": false, "scripts": {}, "marks": "0.5", "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}, {"prompt": "

Give the coordinates of the turning point of the parabola: $\\bigg($[[0]]$, $ [[1]]$\\bigg)$

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": false, "variableReplacements": [], "maxValue": "0", "minValue": "0", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 0.5, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "variableReplacements": [], "maxValue": "{c}", "minValue": "{c}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 0.5, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}], "statement": "

You are given the quadratic function $y=\\simplify[std]{{a}x^2+{c}}$

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "preamble": {"css": "table#values th {\n background: none;\n text-align: center;\n}", "js": "\nfunction dragpoint_board() {\n\n var scope = question.scope; \n var a = scope.variables.a.value;\n var c = scope.variables.c.value;\n \n\n\n var div = Numbas.extensions.jsxgraph.makeBoard('400px','500px',{boundingBox:[-1,5,7,-3],grid:false,\n axis:false,\n grid:false,\n zoom: {\n factorX: 1.25,factorY: 5,wheel: true,needshift: true,eps: 1\n }\n });\n $(question.display.html).find('#dragpoint').append(div);\n var board = div.board;\n \n var xaxis = board.create('axis',\n\t[ [0,0],[1,0] ], {\n\t label: {offset: [7, -10]}, // Doesn't do anything here.\n\t drawZero:false // Doesn't do anything here.\n\t}\n); \nxaxis.removeAllTicks();\nboard.create('ticks', [xaxis, 1], { // The number here is the distance between Major ticks\n\tstrokeColor:'#ccc',\n\tmajorHeight:-1, // Need this because the JXG.Options one doesn't apply\n\tdrawLabels:true, // Needed, and only works for equidistant ticks\n\tlabel: {offset: [-1, -10]},\n\tminorTicks:1, // The NUMBER of small ticks between each Major tick\n\tdrawZero:true\n }\n);\nvar yaxis = board.create('axis',\t[ [0,0],[0,1] ]);\nyaxis.removeAllTicks();\nboard.create('ticks', [yaxis, 5], {\n\tstrokeColor:'#ccc',\n\tmajorHeight:-1, // Need this because the JXG.Options one doesn't apply\n\tdrawLabels:true, // Only works for equidistant ticks\n\tlabel: {offset: [-25, 10]},\n\tminorTicks:1, // The NUMBER of small ticks between each Major tick\n\tdrawZero:false\n }\n);\n \n //shorthand to evaluate a mathematical expression to a number\n function evaluate(expression) {\n try {\n var val = Numbas.jme.evaluate(expression,question.scope);\n return Numbas.jme.unwrapValue(val);\n }\n catch(e) {\n // if there's an error, return no number\n return NaN;\n }\n }\n \n // set up points array\n var num_points = 7;\n var points = [];\n \n \n // this function sets up the i^th point\n function make_point(i) {\n \n // calculate initial coordinates\n var x = i;\n \n // create an invisible vertical line for the point to slide along\n var line = board.create('line',[[x,0],[x,1]],{visible: false});\n \n // create the point\n var point = points[i] = board.create(\n 'glider',\n [i,0,line],\n {\n name:'',\n size:2, // Tama\u00f1o punto\n snapSizeY: 1, // Punt avanza a m\u00faltiplos de 1\n snapToGrid: true\n }\n );\n \n // the contents of the input box for this point\n var studentAnswer = question.parts[2].gaps[i].display.studentAnswer;\n \n //Here I have commented out the functions which connect the student input to the graph and the filling in of the answer fields\n //when the student drags the points on the graph.\n \n // watch the student's input and reposition the point when it changes. \n // ko.computed(function() {\n // y = evaluate(studentAnswer());\n //if(!(isNaN(y)) && board.mode!=board.BOARD_MODE_DRAG) {\n // point.moveTo([x,y],100);\n // }\n // });\n \n // when the student drags the point, update the gapfill input\n point.on('drag',function(){\n var y = Numbas.math.niceNumber(point.Y());\n studentAnswer(y);\n });\n \n }\n \n // create each point\n for(var i=0;iAdapted from a question written in Dutch by Carolijn Tacken.

\n

Disconnected the graph from the answer fields.

", "description": "

Compute a table of values for a quadratic function. A JSXgraph (the graph paper) plot shows the curve going through the entered values. The student input is now disconnected from the graph so that they slide the points usually after they input the values and the answer fields are not updated.

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "AP MAT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/688/"}]}]}], "contributors": [{"name": "AP MAT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/688/"}]}