// Numbas version: finer_feedback_settings {"name": "Alternative order of answers", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Alternative order of answers", "tags": [], "metadata": {"description": "", "licence": "All rights reserved"}, "statement": "
Enter $x=4$ or $-4$.
", "advice": "", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "marked_original_order (Mark the gaps in the original order, mainly to establish if every gap has a valid answer):\n map(\n mark_part(gap[\"path\"],studentAnswer),\n [gap,studentAnswer],\n zip(gaps,studentAnswer)\n )\n\ninterpreted_answers (The interpreted answers for each gap, in the original order):\n map(\n res[\"values\"][\"interpreted_answer\"],\n res,\n marked_original_order\n )\n\nanswers (The student's answers to each gap): interpreted_answers\n\ngap_feedback (Feedback on each of the gaps):\n map(\n try(\n let(\n answer, studentAnswer[answer_number],\n result, submit_part(gaps[gap_number][\"path\"],answer),\n gap, gaps[gap_number],\n name, gap[\"name\"],\n noFeedbackIcon, not gap[\"settings\"][\"showFeedbackIcon\"],\n non_warning_feedback, filter(x[\"op\"]<>\"warning\",x,result[\"feedback\"]),\n assert(noFeedbackIcon,\n assert(name=\"\" or len(gaps)=1 or len(non_warning_feedback)=0,feedback(translate('part.gapfill.feedback header',[\"name\": name])))\n );\n concat_feedback(non_warning_feedback, if(marks>0,result[\"marks\"]/marks,1/len(gaps)), noFeedbackIcon);\n result\n ),\n err,\n fail(translate(\"part.gapfill.error marking gap\",[\"name\": gaps[gap_number][\"name\"], \"message\": err]))\n ),\n [gap_number, answer_number],\n zip(gap_adaptive_order, gap_adaptive_order)\n )\n\nall_valid (Are the answers to all of the gaps valid?):\n all(map(res[\"valid\"], res, marked_original_order))\n\ncheck_answers:\n if(\n answers[1]=answers[2],\n sub_credit(1/3, \"Numbers cannot be the same. \"),\n feedback(\"\")\n )\n\nmark:\n assert(all_valid or not settings[\"sortAnswers\"], fail(translate(\"question.can not submit\")));\n apply(answers);\n apply(check_answers);\n apply(gap_feedback)\n\ninterpreted_answer:\n answers\n\npre_submit:\n map(\n let(\n answer, studentAnswer[answer_number],\n result, submit_part(gaps[gap_number][\"path\"],answer),\n check_pre_submit(gaps[gap_number][\"path\"], answer, exec_path)\n ),\n [gap_number,answer_number],\n zip(gap_order,answer_order)\n )", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "[[0]] $=$ [[1]] or [[2]]
", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "x", "showPreview": false, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "x", "value": ""}]}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "alternatives": [{"type": "numberentry", "useCustomName": true, "customName": "Negative", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "", "useAlternativeFeedback": false, "minValue": "-4", "maxValue": "-4", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "minValue": "4", "maxValue": "4", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "alternatives": [{"type": "numberentry", "useCustomName": true, "customName": "Positive", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "", "useAlternativeFeedback": false, "minValue": "4", "maxValue": "4", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "minValue": "-4", "maxValue": "-4", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Martin Jones", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/145/"}]}]}], "contributors": [{"name": "Martin Jones", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/145/"}]}