// Numbas version: finer_feedback_settings {"name": "In\u00e9quations du premier degr\u00e9", "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": "In\u00e9quations du premier degr\u00e9", "tags": [], "metadata": {"description": "

Champion

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "

Résous les inéquations suivantes dans $\\mathbb{R}$.

", "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}, "b": {"name": "b", "group": "Valeurs g\u00e9n\u00e9riques 2..5", "definition": "repeat(random(6..11),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}, "o": {"name": "o", "group": "Pair 2..8", "definition": "repeat(random(3,5,7,11),20)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [{"name": "Valeurs g\u00e9n\u00e9riques 2..5", "variables": ["b", "a"]}, {"name": "Pair 2..8", "variables": ["e", "o"]}], "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):\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 encore r\u00e9pondu \u00e0 tout\n set_credit(0, \"Veuillez remplir tous les champs de l'exercice.\")\n ,\n let(\n choice_res, marked_original_order[ 0 ], // gap0 : QCM \u00e0 2 choix\n gap1_res, marked_original_order[ 1 ], // gap1 : Deuxi\u00e8me question\n // gap2_res, marked_original_order[ 2 ], // gap2 : Troisi\u00e8me question\n \n // Affichage syst\u00e9matique du feedback visuel (vert/rouge) pour les 3 trous\n apply(choice_res[\"feedback\"]) ;\n apply(gap1_res[\"feedback\"]) ;\n //apply(gap2_res[\"feedback\"]) ;\n \n // \u00c9valuation \"Tout ou Rien\" bas\u00e9e sur les cr\u00e9dits valid\u00e9s par Numbas\n if(choice_res[\"credit\"] = 1 and gap1_res[\"credit\"] = 1, // and gap2_res[\"credit\"] = 1\n set_credit(1, \"Excellent ! Les trois r\u00e9ponses sont correctes.\")\n ,\n set_credit(0, \"Une ou plusieurs r\u00e9ponses sont incorrectes. Vous devez r\u00e9pondre correctement aux trois questions pour obtenir le point.\")\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 )\n", "extendBaseMarkingAlgorithm": false, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "

Résous l'équation $\\var{a[0]}x\\geqslant\\var{b[0]}$

\n

x [[0]] [[1]]

", "gaps": [{"type": "1_n_2", "useCustomName": true, "customName": "Nbr 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": "dropdownlist", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": false, "interpretedAnswerForm": "list of list of boolean", "choices": ["<", "<=", ">=", ">"], "matrix": ["0", "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": "{b[0]}/{a[0]}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": false, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "mustmatchpattern": {"pattern": "( `+- (integer:$n;a / integer:$n;b) `where gcd(abs(a), abs(b)) = 1 ) `| `+- $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 encore r\u00e9pondu \u00e0 tout\n set_credit(0, \"Veuillez remplir tous les champs de l'exercice.\")\n ,\n let(\n choice_res, marked_original_order[ 0 ], // gap0 : QCM \u00e0 2 choix\n gap1_res, marked_original_order[ 1 ], // gap1 : Deuxi\u00e8me question\n // gap2_res, marked_original_order[ 2 ], // gap2 : Troisi\u00e8me question\n \n // Affichage syst\u00e9matique du feedback visuel (vert/rouge) pour les 3 trous\n apply(choice_res[\"feedback\"]) ;\n apply(gap1_res[\"feedback\"]) ;\n //apply(gap2_res[\"feedback\"]) ;\n \n // \u00c9valuation \"Tout ou Rien\" bas\u00e9e sur les cr\u00e9dits valid\u00e9s par Numbas\n if(choice_res[\"credit\"] = 1 and gap1_res[\"credit\"] = 1, // and gap2_res[\"credit\"] = 1\n set_credit(1, \"Excellent ! Les trois r\u00e9ponses sont correctes.\")\n ,\n set_credit(0, \"Une ou plusieurs r\u00e9ponses sont incorrectes. Vous devez r\u00e9pondre correctement aux trois questions pour obtenir le point.\")\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 )\n", "extendBaseMarkingAlgorithm": false, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "

Résous l'équation $-\\var{a[1]}x-\\var{b[1]}<0$

\n

x [[0]] [[1]]

", "gaps": [{"type": "1_n_2", "useCustomName": true, "customName": "Nbr 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": "dropdownlist", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": false, "interpretedAnswerForm": "list of list of boolean", "choices": ["<", "<=", ">=", ">"], "matrix": ["0", "0", "0", "0.5"], "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": "-{b[1]}/{a[1]}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": false, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "mustmatchpattern": {"pattern": "( `+- (integer:$n;a / integer:$n;b) `where gcd(abs(a), abs(b)) = 1 ) `| `+- $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 encore r\u00e9pondu \u00e0 tout\n set_credit(0, \"Veuillez remplir tous les champs de l'exercice.\")\n ,\n let(\n choice_res, marked_original_order[ 0 ], // gap0 : QCM \u00e0 2 choix\n gap1_res, marked_original_order[ 1 ], // gap1 : Deuxi\u00e8me question\n // gap2_res, marked_original_order[ 2 ], // gap2 : Troisi\u00e8me question\n \n // Affichage syst\u00e9matique du feedback visuel (vert/rouge) pour les 3 trous\n apply(choice_res[\"feedback\"]) ;\n apply(gap1_res[\"feedback\"]) ;\n //apply(gap2_res[\"feedback\"]) ;\n \n // \u00c9valuation \"Tout ou Rien\" bas\u00e9e sur les cr\u00e9dits valid\u00e9s par Numbas\n if(choice_res[\"credit\"] = 1 and gap1_res[\"credit\"] = 1, // and gap2_res[\"credit\"] = 1\n set_credit(1, \"Excellent ! Les trois r\u00e9ponses sont correctes.\")\n ,\n set_credit(0, \"Une ou plusieurs r\u00e9ponses sont incorrectes. Vous devez r\u00e9pondre correctement aux trois questions pour obtenir le point.\")\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 )\n", "extendBaseMarkingAlgorithm": false, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "

Résous l'équation $x+\\var{b[2]}\\leqslant\\var{b[3]}$

\n

x [[0]] [[1]]

", "gaps": [{"type": "1_n_2", "useCustomName": true, "customName": "Nbr 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": "dropdownlist", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": false, "interpretedAnswerForm": "list of list of boolean", "choices": ["<", "<=", ">=", ">"], "matrix": ["0", "0.5", "0", "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": "{b[3]}-{b[2]}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": false, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "mustmatchpattern": {"pattern": "( `+- (integer:$n;a / integer:$n;b) `where gcd(abs(a), abs(b)) = 1 ) `| `+- $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 encore r\u00e9pondu \u00e0 tout\n set_credit(0, \"Veuillez remplir tous les champs de l'exercice.\")\n ,\n let(\n choice_res, marked_original_order[ 0 ], // gap0 : QCM \u00e0 2 choix\n gap1_res, marked_original_order[ 1 ], // gap1 : Deuxi\u00e8me question\n // gap2_res, marked_original_order[ 2 ], // gap2 : Troisi\u00e8me question\n \n // Affichage syst\u00e9matique du feedback visuel (vert/rouge) pour les 3 trous\n apply(choice_res[\"feedback\"]) ;\n apply(gap1_res[\"feedback\"]) ;\n //apply(gap2_res[\"feedback\"]) ;\n \n // \u00c9valuation \"Tout ou Rien\" bas\u00e9e sur les cr\u00e9dits valid\u00e9s par Numbas\n if(choice_res[\"credit\"] = 1 and gap1_res[\"credit\"] = 1, // and gap2_res[\"credit\"] = 1\n set_credit(1, \"Excellent ! Les trois r\u00e9ponses sont correctes.\")\n ,\n set_credit(0, \"Une ou plusieurs r\u00e9ponses sont incorrectes. Vous devez r\u00e9pondre correctement aux trois questions pour obtenir le point.\")\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 )\n", "extendBaseMarkingAlgorithm": false, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "

Résous l'équation $-x-\\var{b[4]}>\\var{b[5]}$

\n

x [[0]] [[1]]

", "gaps": [{"type": "1_n_2", "useCustomName": true, "customName": "Nbr 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": "dropdownlist", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": false, "interpretedAnswerForm": "list of list of boolean", "choices": ["<", "<=", ">=", ">"], "matrix": ["0.5", "0", "0", "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": "-{b[4]}-{b[5]}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": false, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "mustmatchpattern": {"pattern": "( `+- (integer:$n;a / integer:$n;b) `where gcd(abs(a), abs(b)) = 1 ) `| `+- $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 encore r\u00e9pondu \u00e0 tout\n set_credit(0, \"Veuillez remplir tous les champs de l'exercice.\")\n ,\n let(\n choice_res, marked_original_order[ 0 ], // gap0 : QCM \u00e0 2 choix\n gap1_res, marked_original_order[ 1 ], // gap1 : Deuxi\u00e8me question\n // gap2_res, marked_original_order[ 2 ], // gap2 : Troisi\u00e8me question\n \n // Affichage syst\u00e9matique du feedback visuel (vert/rouge) pour les 3 trous\n apply(choice_res[\"feedback\"]) ;\n apply(gap1_res[\"feedback\"]) ;\n //apply(gap2_res[\"feedback\"]) ;\n \n // \u00c9valuation \"Tout ou Rien\" bas\u00e9e sur les cr\u00e9dits valid\u00e9s par Numbas\n if(choice_res[\"credit\"] = 1 and gap1_res[\"credit\"] = 1, // and gap2_res[\"credit\"] = 1\n set_credit(1, \"Excellent ! Les trois r\u00e9ponses sont correctes.\")\n ,\n set_credit(0, \"Une ou plusieurs r\u00e9ponses sont incorrectes. Vous devez r\u00e9pondre correctement aux trois questions pour obtenir le point.\")\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 )\n", "extendBaseMarkingAlgorithm": false, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "

Résous l'équation $\\var{a[2]}x+\\var{b[6]}>\\var{b[7]}$

\n

x [[0]] [[1]]

", "gaps": [{"type": "1_n_2", "useCustomName": true, "customName": "Nbr 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": "dropdownlist", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": false, "interpretedAnswerForm": "list of list of boolean", "choices": ["<", "<=", ">=", ">"], "matrix": ["0", "0", "0", "0.5"], "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": "({b[7]}-{b[6]})/{a[2]}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": false, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "mustmatchpattern": {"pattern": "( `+- (integer:$n;a / integer:$n;b) `where gcd(abs(a), abs(b)) = 1 ) `| `+- $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 encore r\u00e9pondu \u00e0 tout\n set_credit(0, \"Veuillez remplir tous les champs de l'exercice.\")\n ,\n let(\n choice_res, marked_original_order[ 0 ], // gap0 : QCM \u00e0 2 choix\n gap1_res, marked_original_order[ 1 ], // gap1 : Deuxi\u00e8me question\n // gap2_res, marked_original_order[ 2 ], // gap2 : Troisi\u00e8me question\n \n // Affichage syst\u00e9matique du feedback visuel (vert/rouge) pour les 3 trous\n apply(choice_res[\"feedback\"]) ;\n apply(gap1_res[\"feedback\"]) ;\n //apply(gap2_res[\"feedback\"]) ;\n \n // \u00c9valuation \"Tout ou Rien\" bas\u00e9e sur les cr\u00e9dits valid\u00e9s par Numbas\n if(choice_res[\"credit\"] = 1 and gap1_res[\"credit\"] = 1, // and gap2_res[\"credit\"] = 1\n set_credit(1, \"Excellent ! Les trois r\u00e9ponses sont correctes.\")\n ,\n set_credit(0, \"Une ou plusieurs r\u00e9ponses sont incorrectes. Vous devez r\u00e9pondre correctement aux trois questions pour obtenir le point.\")\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 )\n", "extendBaseMarkingAlgorithm": false, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "

Résous l'équation $-\\var{a[3]}x+\\var{o[0]}\\leqslant\\var{a[4]}x-\\var{e[0]}$

\n

x [[0]] [[1]]

", "gaps": [{"type": "1_n_2", "useCustomName": true, "customName": "Nbr 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": "dropdownlist", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": false, "interpretedAnswerForm": "list of list of boolean", "choices": ["<", "<=", ">=", ">"], "matrix": ["0", "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": "({o[0]}+{e[0]})/({a[3]}+{a[4]})", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": false, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "mustmatchpattern": {"pattern": "( `+- (integer:$n;a / integer:$n;b) `where gcd(abs(a), abs(b)) = 1 ) `| `+- $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/"}]}