// Numbas version: finer_feedback_settings {"name": "Drag a point into a given graph quadrant", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"tags": [], "extensions": ["jsxgraph"], "rulesets": {}, "metadata": {"description": "
Drag a point into the specified quadrant. Uses jsxgraph
", "licence": "Creative Commons Attribution 4.0 International"}, "functions": {"dragpoints": {"definition": "var div = Numbas.extensions.jsxgraph.makeBoard('400px','400px',{boundingBox:[-11,11,11,-11],grid: true});\nvar board = div.board;\nquestion.board = board;\n\n\nvar p = board.create('point',[0,0],{name: 'P', size: 7, fillColor: 'blue' , strokeColor: 'lightblue' , highlightFillColor: 'lightblue', highlightStrokeColor: 'yellow', snapToGrid: true, showInfobox: false});\n\nquestion.points = {\n p:p\n}\n\np.on('drag',function(){\n Numbas.exam.currentQuestion.parts[0].gaps[0].display.studentAnswer(p.X());\n Numbas.exam.currentQuestion.parts[0].gaps[1].display.studentAnswer(p.Y());\n});\n\n\nreturn div;\n\n", "type": "html", "parameters": [], "language": "javascript"}}, "variable_groups": [], "advice": "", "variablesTest": {"condition": "", "maxRuns": 100}, "preamble": {"js": "", "css": ""}, "name": "Drag a point into a given graph quadrant", "statement": "Move the point P into the region {latex(x_cond)}, {latex(y_cond)}.
", "ungrouped_variables": ["x", "y", "x_cond", "y_cond"], "parts": [{"sortAnswers": false, "variableReplacements": [], "showCorrectAnswer": true, "prompt": "{dragpoints()}
", "marks": 0, "useCustomName": false, "unitTests": [], "customMarkingAlgorithm": "", "type": "gapfill", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "customName": "", "scripts": {"mark": {"order": "after", "script": "this.question.points.p.setAttribute({fillColor: this.credit==1 ? 'green' : 'red'});\n"}}, "extendBaseMarkingAlgorithm": true, "gaps": [{"showFractionHint": true, "variableReplacements": [], "showCorrectAnswer": true, "correctAnswerFraction": false, "marks": 1, "notationStyles": ["plain", "en", "si-en"], "useCustomName": false, "maxValue": "x*10", "unitTests": [], "minValue": "x", "customMarkingAlgorithm": "", "type": "numberentry", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "mustBeReducedPC": 0, "customName": "", "scripts": {}, "allowFractions": false, "mustBeReduced": false, "correctAnswerStyle": "plain", "extendBaseMarkingAlgorithm": true}, {"showFractionHint": true, "variableReplacements": [], "showCorrectAnswer": true, "correctAnswerFraction": false, "marks": 1, "notationStyles": ["plain", "en", "si-en"], "useCustomName": false, "maxValue": "y*10", "unitTests": [], "minValue": "y", "customMarkingAlgorithm": "", "type": "numberentry", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "mustBeReducedPC": 0, "customName": "", "scripts": {}, "allowFractions": false, "mustBeReduced": false, "correctAnswerStyle": "plain", "extendBaseMarkingAlgorithm": true}]}], "variables": {"y_cond": {"definition": "if(y=1,'y>0','y<0')", "description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "y_cond"}, "y": {"definition": "random(-1,1)", "description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "y"}, "x": {"definition": "random(-1,1)", "description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "x"}, "x_cond": {"definition": "if(x=1,'x>0','x<0')", "description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "x_cond"}}, "type": "question", "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}, {"name": "Bradley Bush", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1521/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}, {"name": "Bradley Bush", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1521/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}