// Numbas version: exam_results_page_options {"name": "Catch malrules", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"advice": "", "parts": [{"showCorrectAnswer": true, "showPreview": true, "variableReplacements": [], "checkVariableNames": false, "vsetRangePoints": 5, "scripts": {}, "extendBaseMarkingAlgorithm": true, "type": "jme", "answer": "-2sin(2x)", "vsetRange": [0, 1], "expectedVariableNames": [], "prompt": "

Differentiate $f(x) = \\cos(2x)$

", "unitTests": [], "checkingAccuracy": 0.001, "checkingType": "absdiff", "failureRate": 1, "variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "malrules:\n [\n [\"2sin(2x)\", \"Did you forget a minus sign?\"],\n [\"-sin(2x)\", \"You might have forgotten to apply the chain rule.\"],\n [\"2cos(2x)\", \"It looks like you forgot to differentiate $\\\\cos$.\"],\n [\"1/2sin(2x)\", \"It looks like you integrated instead of differentiating.\"]\n ]\n\n\nparsed_malrules: \n map(\n [\"expr\":parse(x[0]),\"feedback\":x[1]],\n x,\n malrules\n )\n\nagree_malrules (Do the student's answer and the expected answer agree on each of the sets of variable values?):\n map(\n len(filter(not x ,x,map(\n try(\n resultsEqual(unset(question_definitions,eval(studentexpr,vars)),unset(question_definitions,eval(malrule[\"expr\"],vars)),settings[\"checkingType\"],settings[\"checkingAccuracy\"]),\n message,\n false\n ),\n vars,\n vset\n )))This question catches some expected incorrect answers and gives appropriate feedback, along with partial marks.

", "ungrouped_variables": [], "preamble": {"js": "", "css": ""}, "rulesets": {}, "extensions": [], "variablesTest": {"condition": "", "maxRuns": 100}, "variable_groups": [], "functions": {}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Identify when the student gives an expected incorrect answer, and give appropriate feedback as well as partial marks.

"}, "type": "question", "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}