// Numbas version: finer_feedback_settings
{"name": "\u00c9quations (1er degr\u00e9 et division)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "feedback": {"showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showpartfeedbackmessageswhen": "always", "allowrevealanswer": true, "showexpectedanswerswhen": "inreview", "showadvicewhen": "inreview"}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "\u00c9quations (1er degr\u00e9 et division)", "tags": [], "metadata": {"description": "
Platine
", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "Calcule et écris ta réponse sous forme d'une fraction simplifiée au maximum, terme négatif au numérateur.
", "advice": "", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"a": {"name": "a", "group": "Valeurs g\u00e9n\u00e9riques 2..5", "definition": "repeat(random(2..5),20)", "description": "", "templateType": "anything", "can_override": false}, "d": {"name": "d", "group": "2 ou 3", "definition": "repeat(random(2..3),10)", "description": "Random 2..3
", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Valeurs g\u00e9n\u00e9riques 2..5", "definition": "repeat(random(2..5 except 3),20)", "description": "", "templateType": "anything", "can_override": false}, "p": {"name": "p", "group": "Multiples avec 2 3 5", "definition": "repeat(random([12, 15, 16, 18, 20, 24]),20)", "description": "", "templateType": "anything", "can_override": false}, "q": {"name": "q", "group": "Multiples avec 2 3 5", "definition": "repeat(random([12, 15, 16, 18, 20, 24, 25, 27, 30, 32, 36, 40, 45, 48]),20)", "description": "", "templateType": "anything", "can_override": false}, "r": {"name": "r", "group": "Multiples avec 2 3 5", "definition": "repeat(random([2,3,5,6,8,9,10,12]),20)", "description": "", "templateType": "anything", "can_override": false}, "o": {"name": "o", "group": "Impair (3,5)", "definition": "repeat(random(3,5,7,9),20)", "description": "", "templateType": "anything", "can_override": false}, "e": {"name": "e", "group": "Pair 2..8", "definition": "repeat(random(2,4,6,8),20)", "description": "", "templateType": "anything", "can_override": false}, "sol10": {"name": "sol10", "group": "Q10", "definition": "-{b[13]}/{a[10]}", "description": "", "templateType": "anything", "can_override": false}, "ce10": {"name": "ce10", "group": "Q10", "definition": "{b[14]} / {a[11]}", "description": "", "templateType": "anything", "can_override": false}, "sol_egale_ce10": {"name": "sol_egale_ce10", "group": "Q10", "definition": "sol10 = ce10", "description": "", "templateType": "anything", "can_override": false}, "correct_gap1_10": {"name": "correct_gap1_10", "group": "Q10", "definition": "if(sol_egale_ce10,1,0)", "description": "", "templateType": "anything", "can_override": false}, "ce11": {"name": "ce11", "group": "Ungrouped variables", "definition": "1", "description": "", "templateType": "anything", "can_override": false}, "sol11": {"name": "sol11", "group": "Q11", "definition": "(-{a[12]}*{b[16]}-{a[14]}*{b[15]} ) / ( {a[14]}*{a[13]} - {a[12]}*{a[15]} )", "description": "", "templateType": "anything", "can_override": false}, "ce11_1": {"name": "ce11_1", "group": "Q11", "definition": "-{b[15]}/{a[13]}", "description": "", "templateType": "anything", "can_override": false}, "ce11_2": {"name": "ce11_2", "group": "Q11", "definition": "{b[16]}/{a[15]}", "description": "", "templateType": "anything", "can_override": false}, "sol_egale_ce11": {"name": "sol_egale_ce11", "group": "Q11", "definition": "sol11 = ce11_1 or sol11 = ce11_2", "description": "", "templateType": "anything", "can_override": false}, "correct_gap1_11": {"name": "correct_gap1_11", "group": "Q11", "definition": "if(sol11 = ce11_1 or sol11 = ce11_2,1,0)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["ce11"], "variable_groups": [{"name": "Valeurs g\u00e9n\u00e9riques 2..5", "variables": ["b", "a"]}, {"name": "2 ou 3", "variables": ["d"]}, {"name": "Impair (3,5)", "variables": ["o"]}, {"name": "Multiples avec 2 3 5", "variables": ["p", "q", "r"]}, {"name": "Pair 2..8", "variables": ["e"]}, {"name": "Q10", "variables": ["sol10", "ce10", "sol_egale_ce10", "correct_gap1_10"]}, {"name": "Q11", "variables": ["sol11", "ce11_1", "ce11_2", "sol_egale_ce11", "correct_gap1_11"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "$x + \\var{b[0]} = 0$
$x =$
", "answer": "-{b[0]}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "notallowed": {"strings": ["(", "+", ":", "^", ")", "x"], "showStrings": false, "partialCredit": 0, "message": "Caractère interdit utilisé."}, "mustmatchpattern": {"pattern": "( `+- (integer:$n;a / integer:$n;b) `where gcd(abs(a), abs(b)) = 1 and abs(b) > 1 ) `| `+- integer:$n", "partialCredit": 0, "message": "La réponse attendue est une fraction irréductible", "nameToCompare": "", "warningTime": "input"}, "valuegenerators": [], "functionsets": ["arithmetic", "complex_numbers", "exponentials", "trigonometry", "rounding", "number_theory", "comparison", "linear_algebra", "booleans", "set_theory", "intervals", "number_ranges", "lists", "dictionaries", "strings", "type_casting", "number_parsing", "precision", "json", "jme", "pattern_matching", "html", "randomisation", "control_flow", "comprehensions", "calculus", "marking", "http", "promises"], "enabledfunctions": [], "disabledfunctions": []}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "$x + \\var{b[1]} = -\\var{b[2]}$
$x =$
", "answer": "-{b[2]} - {b[1]}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "notallowed": {"strings": ["(", "+", ":", "^", ")", "x"], "showStrings": false, "partialCredit": 0, "message": "Caractère interdit utilisé."}, "mustmatchpattern": {"pattern": "( `+- (integer:$n;a / integer:$n;b) `where gcd(abs(a), abs(b)) = 1 and abs(b) > 1 ) `| `+- integer:$n", "partialCredit": 0, "message": "La réponse attendue est une fraction irréductible", "nameToCompare": "", "warningTime": "input"}, "valuegenerators": [], "functionsets": ["arithmetic", "complex_numbers", "exponentials", "trigonometry", "rounding", "number_theory", "comparison", "linear_algebra", "booleans", "set_theory", "intervals", "number_ranges", "lists", "dictionaries", "strings", "type_casting", "number_parsing", "precision", "json", "jme", "pattern_matching", "html", "randomisation", "control_flow", "comprehensions", "calculus", "marking", "http", "promises"], "enabledfunctions": [], "disabledfunctions": []}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "$\\var{a[0]}x = \\var{b[3]}$
$x =$
", "answer": "{b[3]} / {a[0]}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "notallowed": {"strings": ["(", "+", ":", "^", ")", "x"], "showStrings": false, "partialCredit": 0, "message": "Caractère interdit utilisé."}, "mustmatchpattern": {"pattern": "( `+- (integer:$n;a / integer:$n;b) `where gcd(abs(a), abs(b)) = 1 and abs(b) > 1 ) `| `+- integer:$n", "partialCredit": 0, "message": "La réponse attendue est une fraction irréductible", "nameToCompare": "", "warningTime": "input"}, "valuegenerators": [], "functionsets": ["arithmetic", "complex_numbers", "exponentials", "trigonometry", "rounding", "number_theory", "comparison", "linear_algebra", "booleans", "set_theory", "intervals", "number_ranges", "lists", "dictionaries", "strings", "type_casting", "number_parsing", "precision", "json", "jme", "pattern_matching", "html", "randomisation", "control_flow", "comprehensions", "calculus", "marking", "http", "promises"], "enabledfunctions": [], "disabledfunctions": []}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "$\\var{a[1]}x = 0$
$x =$
", "answer": "0", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "notallowed": {"strings": ["(", "+", ":", "^", ")", "x"], "showStrings": false, "partialCredit": 0, "message": "Caractère interdit utilisé."}, "mustmatchpattern": {"pattern": "( `+- (integer:$n;a / integer:$n;b) `where gcd(abs(a), abs(b)) = 1 and abs(b) > 1 ) `| `+- integer:$n", "partialCredit": 0, "message": "La réponse attendue est une fraction irréductible", "nameToCompare": "", "warningTime": "input"}, "valuegenerators": [], "functionsets": ["arithmetic", "complex_numbers", "exponentials", "trigonometry", "rounding", "number_theory", "comparison", "linear_algebra", "booleans", "set_theory", "intervals", "number_ranges", "lists", "dictionaries", "strings", "type_casting", "number_parsing", "precision", "json", "jme", "pattern_matching", "html", "randomisation", "control_flow", "comprehensions", "calculus", "marking", "http", "promises"], "enabledfunctions": [], "disabledfunctions": []}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "$-\\var{a[2]}x + \\var{b[4]} = \\var{b[5]}$
$x =$
", "answer": "({b[4]} - {b[5]}) / {a[2]}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "notallowed": {"strings": ["(", "+", ":", "^", ")", "x"], "showStrings": false, "partialCredit": 0, "message": "Caractère interdit utilisé."}, "mustmatchpattern": {"pattern": "( `+- (integer:$n;a / integer:$n;b) `where gcd(abs(a), abs(b)) = 1 and abs(b) > 1 ) `| `+- integer:$n", "partialCredit": 0, "message": "La réponse attendue est une fraction irréductible", "nameToCompare": "", "warningTime": "input"}, "valuegenerators": [], "functionsets": ["arithmetic", "complex_numbers", "exponentials", "trigonometry", "rounding", "number_theory", "comparison", "linear_algebra", "booleans", "set_theory", "intervals", "number_ranges", "lists", "dictionaries", "strings", "type_casting", "number_parsing", "precision", "json", "jme", "pattern_matching", "html", "randomisation", "control_flow", "comprehensions", "calculus", "marking", "http", "promises"], "enabledfunctions": [], "disabledfunctions": []}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "$\\dfrac{x + \\var{b[6]}}{\\var{a[3]}} = \\var{b[7]}$
$x =$
", "answer": "{a[3]}*{b[7]} - {b[6]}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "notallowed": {"strings": ["(", "+", ":", "^", ")", "x"], "showStrings": false, "partialCredit": 0, "message": "Caractère interdit utilisé."}, "mustmatchpattern": {"pattern": "( `+- (integer:$n;a / integer:$n;b) `where gcd(abs(a), abs(b)) = 1 and abs(b) > 1 ) `| `+- integer:$n", "partialCredit": 0, "message": "La réponse attendue est une fraction irréductible", "nameToCompare": "", "warningTime": "input"}, "valuegenerators": [], "functionsets": ["arithmetic", "complex_numbers", "exponentials", "trigonometry", "rounding", "number_theory", "comparison", "linear_algebra", "booleans", "set_theory", "intervals", "number_ranges", "lists", "dictionaries", "strings", "type_casting", "number_parsing", "precision", "json", "jme", "pattern_matching", "html", "randomisation", "control_flow", "comprehensions", "calculus", "marking", "http", "promises"], "enabledfunctions": [], "disabledfunctions": []}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "$\\var{o[0]}x - \\var{b[8]} = \\var{e[0]}x + \\var{b[9]}$
$x =$
", "answer": "({b[9]} + {b[8]}) / ({o[0]} - {e[0]})", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "notallowed": {"strings": ["(", "+", ":", "^", ")", "x"], "showStrings": false, "partialCredit": 0, "message": "Caractère interdit utilisé."}, "mustmatchpattern": {"pattern": "( `+- (integer:$n;a / integer:$n;b) `where gcd(abs(a), abs(b)) = 1 and abs(b) > 1 ) `| `+- integer:$n", "partialCredit": 0, "message": "La réponse attendue est une fraction irréductible", "nameToCompare": "", "warningTime": "input"}, "valuegenerators": [], "functionsets": ["arithmetic", "complex_numbers", "exponentials", "trigonometry", "rounding", "number_theory", "comparison", "linear_algebra", "booleans", "set_theory", "intervals", "number_ranges", "lists", "dictionaries", "strings", "type_casting", "number_parsing", "precision", "json", "jme", "pattern_matching", "html", "randomisation", "control_flow", "comprehensions", "calculus", "marking", "http", "promises"], "enabledfunctions": [], "disabledfunctions": []}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "$\\dfrac{\\var{a[5]}x - \\var{b[10]}}{\\var{a[9]}} + \\var{b[11]} = \\var{b[12]}$
$x =$
", "answer": "({a[9]}*({b[12]} - {b[11]}) + {b[10]}) / {a[5]}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "notallowed": {"strings": ["(", "+", ":", "^", ")", "x"], "showStrings": false, "partialCredit": 0, "message": "Caractère interdit utilisé."}, "mustmatchpattern": {"pattern": "( `+- (integer:$n;a / integer:$n;b) `where gcd(abs(a), abs(b)) = 1 and abs(b) > 1 ) `| `+- integer:$n", "partialCredit": 0, "message": "La réponse attendue est une fraction irréductible", "nameToCompare": "", "warningTime": "input"}, "valuegenerators": [], "functionsets": ["arithmetic", "complex_numbers", "exponentials", "trigonometry", "rounding", "number_theory", "comparison", "linear_algebra", "booleans", "set_theory", "intervals", "number_ranges", "lists", "dictionaries", "strings", "type_casting", "number_parsing", "precision", "json", "jme", "pattern_matching", "html", "randomisation", "control_flow", "comprehensions", "calculus", "marking", "http", "promises"], "enabledfunctions": [], "disabledfunctions": []}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "$\\dfrac{\\var{a[6]}}{x} = \\dfrac{\\var{a[8]}}{\\var{a[7]}}$
$x =$
", "answer": "({a[6]}*{a[7]})/{a[8]}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "notallowed": {"strings": ["(", "+", ":", "^", ")", "x"], "showStrings": false, "partialCredit": 0, "message": "Caractère interdit utilisé."}, "mustmatchpattern": {"pattern": "( `+- (integer:$n;a / integer:$n;b) `where gcd(abs(a), abs(b)) = 1 and abs(b) > 1 ) `| `+- integer:$n", "partialCredit": 0, "message": "La réponse attendue est une fraction irréductible", "nameToCompare": "", "warningTime": "input"}, "valuegenerators": [], "functionsets": ["arithmetic", "complex_numbers", "exponentials", "trigonometry", "rounding", "number_theory", "comparison", "linear_algebra", "booleans", "set_theory", "intervals", "number_ranges", "lists", "dictionaries", "strings", "type_casting", "number_parsing", "precision", "json", "jme", "pattern_matching", "html", "randomisation", "control_flow", "comprehensions", "calculus", "marking", "http", "promises"], "enabledfunctions": [], "disabledfunctions": []}, {"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):\n if(settings[\"sortAnswers\"],\n sort(interpreted_answers)\n ,\n interpreted_answers\n )\n\ngap_order:\n if(settings[\"sortAnswers\"],\n sort_destinations(interpreted_answers)\n ,\n gap_adaptive_order\n )\n\nanswer_order:\n if(settings[\"sortAnswers\"],\n 0..(len(studentAnswer)-1)\n ,\n gap_adaptive_order\n )\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_order,answer_order)\n )\n\nall_valid (Are the answers to all of the gaps valid?):\n all(map(res[\"valid\"],res,marked_original_order))\n\nmark:\n assert(all_valid or not settings[\"sortAnswers\"], fail(translate(\"question.can not submit\")));\n let(\n num_gaps, len(marked_original_order),\n expected_gaps, len(gaps),\n \n if(num_gaps < expected_gaps,\n // S\u00e9curit\u00e9 : Si tous les trous ne sont pas encore pr\u00eats/soumis, on ne note pas et on ne plante pas\n set_credit(0, \"Veuillez remplir tous les champs de l'exercice.\")\n ,\n // Si et seulement si les 3 trous sont disponibles, on ex\u00e9cute l'\u00e9valuation\n let(\n ce_res, marked_original_order[ 0 ], // gap0 : Condition d'existence (ce10)\n choice_res, marked_original_order[ 1 ], // gap1 : Choix Oui / Non (correct_gap1_10)\n sol_res, marked_original_order[ 2 ], // gap2 : Valeur de x (sol10)\n \n // ANALYSE COMPATIBLE DOUBLE FORMAT ET S\u00c9CURIS\u00c9E CONTRE LES INDICES HORS LIMITES\n ans, choice_res[\"values\"][\"interpreted_answer\"],\n student_chose_yes, choice_res[\"valid\"] and len(ans) > 0 and (\n ans = [ 0 ] or \n ans = [ [true, false] ] or \n (type(ans[ 0 ]) = \"list\" and len(ans[ 0 ]) > 0 and ans[ 0 ][ 0 ]) or \n ans[ 0 ] = 0\n ),\n student_chose_no, choice_res[\"valid\"] and len(ans) > 0 and (\n ans = [ 1 ] or \n ans = [ [false, true] ] or \n (type(ans[ 0 ]) = \"list\" and len(ans[ 0 ]) > 1 and ans[ 0 ][ 1 ]) or \n ans[ 0 ] = 1\n ),\n \n // On applique toujours le feedback visuel (vert/rouge) sur la CE\n apply(ce_res[\"feedback\"]),\n \n if(ce_res[\"credit\"] < 1,\n // Condition 1 : Si la CE est fausse, note globale = 0 d'office\n set_credit(0, \"La condition d'existence (CE) est incorrecte.\")\n ,\n // Si la CE est correcte, on applique le reste de la logique :\n if(sol_egale_ce10,\n // CAS A : La solution th\u00e9orique tombe sur la CE (donc pas de solution r\u00e9elle)\n apply(choice_res[\"feedback\"]);\n if(student_chose_no,\n // L'\u00e9l\u00e8ve a correctement r\u00e9pondu \"non\" -> R\u00e9ussite\n set_credit(1, \"Correct ! Comme la solution th\u00e9orique est exclue par la condition d'existence, l'\u00e9quation n'admet effectivement aucune solution.\")\n ,\n // L'\u00e9l\u00e8ve a r\u00e9pondu \"oui\" ou n'a pas r\u00e9pondu -> \u00c9chec\n set_credit(0, \"La condition d'existence est correcte, mais l'\u00e9quation admet-elle vraiment une solution ?\")\n )\n ,\n // CAS B : L'\u00e9quation admet bien une solution r\u00e9elle\n apply(choice_res[\"feedback\"]);\n apply(sol_res[\"feedback\"]);\n if(student_chose_yes and sol_res[\"credit\"] = 1,\n // L'\u00e9l\u00e8ve a r\u00e9pondu \"oui\" ET sa solution est correcte -> R\u00e9ussite\n set_credit(1, \"Excellent ! La solution est correcte et respecte la condition d'existence.\")\n ,\n // Mauvais choix ou solution incorrecte -> \u00c9chec\n set_credit(0, \"La condition d'existence est correcte, mais la solution finale est fausse ou manquante.\")\n )\n )\n )\n )\n )\n )\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": false, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "$\\dfrac{\\var{a[10]}x + \\var{b[13]}}{-\\var{a[11]}x + \\var{b[14]}} = 0$
\nCE : $x \\neq$ [[0]]
\nY a-t-il une solution à l'équation ?
\n [[1]]
\nSi oui, x = [[2]] (si non, laisse vide)
\n", "gaps": [{"type": "jme", "useCustomName": true, "customName": "CE", "marks": "0.5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "answer": "{ce10}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "mustmatchpattern": {"pattern": "( `+- (integer:$n;a / integer:$n;b) `where gcd(abs(a), abs(b)) = 1 and abs(b) > 1 ) `| `+- integer:$n", "partialCredit": 0, "message": "", "nameToCompare": "", "warningTime": "submission"}, "valuegenerators": [], "functionsets": ["arithmetic", "complex_numbers", "exponentials", "trigonometry", "rounding", "number_theory", "comparison", "linear_algebra", "booleans", "set_theory", "intervals", "number_ranges", "lists", "dictionaries", "strings", "type_casting", "number_parsing", "precision", "json", "jme", "pattern_matching", "html", "randomisation", "control_flow", "comprehensions", "calculus", "marking", "http", "promises"], "enabledfunctions": [], "disabledfunctions": []}, {"type": "1_n_2", "useCustomName": true, "customName": "Sol ?", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["Oui", "Non"], "matrix": ["if(!sol_egale_ce10,0.5,0)", "if(sol_egale_ce10,0.5,0)"], "distractors": ["", ""]}, {"type": "jme", "useCustomName": true, "customName": "Sol", "marks": "0", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "answer": "{sol10}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "mustmatchpattern": {"pattern": "( `+- (integer:$n;a / integer:$n;b) `where gcd(abs(a), abs(b)) = 1 and abs(b) > 1 ) `| `+- integer:$n", "partialCredit": 0, "message": "", "nameToCompare": "", "warningTime": "submission"}, "valuegenerators": [], "functionsets": ["arithmetic", "complex_numbers", "exponentials", "trigonometry", "rounding", "number_theory", "comparison", "linear_algebra", "booleans", "set_theory", "intervals", "number_ranges", "lists", "dictionaries", "strings", "type_casting", "number_parsing", "precision", "json", "jme", "pattern_matching", "html", "randomisation", "control_flow", "comprehensions", "calculus", "marking", "http", "promises"], "enabledfunctions": [], "disabledfunctions": []}], "sortAnswers": false, "inlineCorrectAnswer": true}, {"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):\n if(settings[\"sortAnswers\"],\n sort(interpreted_answers)\n ,\n interpreted_answers\n )\n\ngap_order:\n if(settings[\"sortAnswers\"],\n sort_destinations(interpreted_answers)\n ,\n gap_adaptive_order\n )\n\nanswer_order:\n if(settings[\"sortAnswers\"],\n 0..(len(studentAnswer)-1)\n ,\n gap_adaptive_order\n )\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_order,answer_order)\n )\n\nall_valid (Are the answers to all of the gaps valid?):\n all(map(res[\"valid\"],res,marked_original_order))\n\nmark:\n assert(all_valid or not settings[\"sortAnswers\"], fail(translate(\"question.can not submit\")));\n let(\n num_gaps, len(marked_original_order),\n expected_gaps, len(gaps),\n \n if(num_gaps < expected_gaps,\n // S\u00e9curit\u00e9 anti-plantage si l'\u00e9l\u00e8ve n'a pas tout rempli\n set_credit(0, \"Veuillez remplir tous les champs de l'exercice.\")\n ,\n let(\n choice_res, marked_original_order[ 0 ], // gap0 : Nombre de solutions\n sol_res, marked_original_order[ 1 ], // gap1 : Solution de l'\u00e9quation\n \n ans, choice_res[\"values\"][\"interpreted_answer\"],\n \n // D\u00e9tection ultra-robuste de l'option choisie par l'\u00e9l\u00e8ve (g\u00e8re listes, bool\u00e9ens et entiers)\n student_chose_0, choice_res[\"valid\"] and len(ans) > 0 and (\n ans = [ 0 ] or \n ans = [ [true, false, false] ] or \n (type(ans[ 0 ]) = \"list\" and len(ans[ 0 ]) > 0 and ans[ 0 ][ 0 ]) or \n ans[ 0 ] = 0\n ),\n \n student_chose_1, choice_res[\"valid\"] and len(ans) > 0 and (\n ans = [ 1 ] or \n ans = [ [false, true, false] ] or \n (type(ans[ 0 ]) = \"list\" and len(ans[ 0 ]) > 1 and ans[ 0 ][ 1 ]) or \n ans[ 0 ] = 1\n ),\n \n student_chose_2, choice_res[\"valid\"] and len(ans) > 0 and (\n ans = [ 2 ] or \n ans = [ [false, false, true] ] or \n (type(ans[ 0 ]) = \"list\" and len(ans[ 0 ]) > 2 and ans[ 0 ][ 2 ]) or \n ans[ 0 ] = 2\n ),\n \n if(choice_res[\"credit\"] < 1,\n // CAS 1 : Le choix du nombre de solutions est faux -> 0 point\n apply(choice_res[\"feedback\"]) ;\n set_credit(0, \"Le nombre de solutions choisi est incorrect.\")\n ,\n // CAS 2 : Le choix du nombre de solutions est correct\n if(student_chose_0,\n // Option \"0 solution\" choisie et valid\u00e9e -> R\u00e9ussite imm\u00e9diate (pas d'\u00e9valuation de la solution)\n apply(choice_res[\"feedback\"]) ;\n set_credit(1, \"Correct ! L'\u00e9quation n'admet effectivement aucune solution.\")\n ,\n // Option \"1 solution\" ou \"2 solutions\" choisie et valid\u00e9e -> On \u00e9value la solution saisie\n apply(choice_res[\"feedback\"]) ;\n apply(sol_res[\"feedback\"]) ;\n if(sol_res[\"credit\"] = 1,\n set_credit(1, \"Excellent ! Le nombre de solutions est correct et la solution propos\u00e9e est exacte.\")\n ,\n set_credit(0, \"Le nombre de solutions est correct, mais la solution finale est fausse ou incompl\u00e8te.\")\n )\n )\n )\n )\n )\n )\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": false, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "$\\dfrac{\\var{a[12]}}{\\var{a[13]}x+\\var{b[15]}}=\\dfrac{\\var{a[14]}}{\\var{a[15]}x-\\var{b[16]}}$
\nCombien y a-t-il de solutions à l'équation ?
\n [[0]]
\nS'il y en a, donne-en une. x = [[1]] (si non, laisse vide)
\n", "gaps": [{"type": "1_n_2", "useCustomName": true, "customName": "Sol ?", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["0", "1", "2"], "matrix": ["if(sol_egale_ce11, 0.5, 0)", "if(sol_egale_ce11, 0, 0.5)", 0], "distractors": ["", "", ""]}, {"type": "jme", "useCustomName": true, "customName": "Sol", "marks": "0.5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "answer": "{sol11}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "mustmatchpattern": {"pattern": "( `+- (integer:$n;a / integer:$n;b) `where gcd(abs(a), abs(b)) = 1 and abs(b) > 1 ) `| `+- integer:$n", "partialCredit": 0, "message": "", "nameToCompare": "", "warningTime": "submission"}, "valuegenerators": [], "functionsets": ["arithmetic", "complex_numbers", "exponentials", "trigonometry", "rounding", "number_theory", "comparison", "linear_algebra", "booleans", "set_theory", "intervals", "number_ranges", "lists", "dictionaries", "strings", "type_casting", "number_parsing", "precision", "json", "jme", "pattern_matching", "html", "randomisation", "control_flow", "comprehensions", "calculus", "marking", "http", "promises"], "enabledfunctions": [], "disabledfunctions": []}], "sortAnswers": false, "inlineCorrectAnswer": true}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "showAllParts": false, "contributors": [{"name": "Robin Lecocq", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/38160/"}], "resources": []}]}], "contributors": [{"name": "Robin Lecocq", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/38160/"}]}