HEX
Server: Apache
System: Linux vps.mmtprep.com 4.18.0-477.21.1.el8_8.x86_64 #1 SMP Thu Aug 10 13:51:50 EDT 2023 x86_64
User: mmtprep (1001)
PHP: 8.1.34
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/mmtprep/public_html/mathzen.mmtprep.com/assets/betaModele50_Mathsteps-IXdw6ebP.js.map
{"version":3,"file":"betaModele50_Mathsteps-IXdw6ebP.js","sources":["../../src/exercices/beta/betaModele50_Mathsteps.js"],"sourcesContent":["import { combinaisonListes } from '../../lib/outils/arrayOutils'\nimport Exercice from '../Exercice'\nimport { listeQuestionsToContenu } from '../../modules/outils.js'\nimport { toTex, resoudre, calculer, aleaVariables } from '../../modules/outilsMathjs.js'\nimport { simplify } from 'mathjs'\nexport const titre = 'Nom de l\\'exercice'\n\n// Les exports suivants sont optionnels mais au moins la date de publication semble essentielle\nexport const dateDePublication = '25/10/2021' // La date de publication initiale au format 'jj/mm/aaaa' pour affichage temporaire d'un tag\nexport const dateDeModifImportante = '24/10/2021' // Une date de modification importante au format 'jj/mm/aaaa' pour affichage temporaire d'un tag\n\n/**\n * Description didactique de l'exercice\n * @author\n * Référence\n*/\nexport default class NomExercice extends Exercice {\n  constructor () {\n    super()\n    this.titre = titre\n    this.consigne = 'Consigne'\n    this.nbQuestions = 6 // Nombre de questions par défaut\n    this.nbCols = 2 // Uniquement pour la sortie LaTeX\n    this.nbColsCorr = 2 // Uniquement pour la sortie LaTeX\n    this.video = '' // Id YouTube ou url\n  }\n\n  nouvelleVersion () {\n    this.listeQuestions = [] // Liste de questions\n    this.listeCorrections = [] // Liste de questions corrigées\n    this.autoCorrection = []\n\n    const typeQuestionsDisponibles = ['type1', 'type2', 'type3', 'type4', 'type5', 'type6'] // On créé 3 types de questions\n\n    const listeTypeQuestions = combinaisonListes(typeQuestionsDisponibles, this.nbQuestions) // Tous les types de questions sont posés mais l'ordre diffère à chaque \"cycle\"\n    for (let i = 0, exercice = {}, cpt = 0; i < this.nbQuestions && cpt < 50;) { // Boucle principale où i+1 correspond au numéro de la question\n      switch (listeTypeQuestions[i]) { // Suivant le type de question, le contenu sera différent\n        case 'type1': {\n          const variables = aleaVariables(\n            {\n              a: false,\n              b: false\n            }\n          )\n          exercice = calculer('(a*x+b)^2', { variables, name: 'A' })\n          exercice.texte = `Développer puis réduire l'expression suivante : $${exercice.name}=${exercice.printExpression}$`\n          exercice.texteCorr = this.correctionDetaillee ? '<br>' + exercice.texteCorr : `$${exercice.name}=${exercice.printResult}$`\n          break\n        }\n        case 'type2' : {\n          const variables = aleaVariables(\n            {\n              a: false,\n              b: false,\n              c: false\n            }\n          )\n          exercice = calculer('a/2*(b/3+c/8)', { variables, substeps: true })\n          exercice.texte = `Calculer : $${exercice.printExpression}$`\n          exercice.texteCorr = this.correctionDetaillee ? '<br>' + exercice.texteCorr : `$${exercice.printExpression}=${exercice.printResult}$`\n          break\n        }\n        case 'type3': {\n          const variables = aleaVariables(\n            {\n              a: true,\n              b: true,\n              c: true,\n              d: false,\n              e: false,\n              f: false,\n              disc: '(b/e)^2-4*(a/d)*(c/f)'\n              // test: 'abs(a)!=d and abs(b)!=e and abs(c)!=f and 1<d and 1<e and 1<f and gcd(abs(a),d)==1 and gcd(abs(b),e)==1 and gcd(abs(c),f)==1'\n            }\n          )\n          const polynomeTex = toTex(simplify('a/d*x^2+b/e*x+c/f', [], variables), { suppr1: true })\n          const discriminantTex = toTex(simplify('(b/e)^2-4*(a/d)*(c/f)', [], variables), { suppr1: true })\n          const stepscalculsDiscriminant = calculer('(b/e)^2-4*(a/d)*c/f', { variables, comments: false, mixed: false, name: '\\\\Delta' }).texteCorr\n          exercice = {}\n          exercice.texteCorr = `$\\\\Delta = b^2-4ac=${discriminantTex}=${toTex(variables.disc.toFraction())}$\n          <br>\n          Calcul détaillé :\n          <br>\n          ${stepscalculsDiscriminant}`\n          exercice.texte = `Le discriminant de $${polynomeTex}$ est : `\n          break\n        }\n        case 'type4': {\n          const variables = aleaVariables(\n            {\n              a: true,\n              b: true\n            }\n          )\n          const commentairesPersonnalises = {\n            CANCEL_MINUSES: 'Simplifier l\\'écriture',\n            SUBTRACT_FROM_BOTH_SIDES: 'Enlever {stepChange} à chaque membre.',\n            SIMPLIFY_ARITHMETIC: '',\n            SIMPLIFY_RIGHT_SIDE: 'Réduire.',\n            SIMPLIFY_LEFT_SIDE: 'Réduire.'\n          }\n          exercice = resoudre('3*x+a=9*x+b', { variables, comment: true, comments: commentairesPersonnalises })\n          exercice.texte = `Résoudre l'équation $${exercice.equation}$ en détaillant les étapes.`\n          exercice.texteCorr = `${context.isHtml ? '<br>' : ''}\n          ${exercice.texteCorr}\n          <br>\n          La solution de cette équation est donc $${exercice.solution}$.`\n        }\n          break\n        case 'type5': {\n          const variables = aleaVariables(\n            {\n              a: true,\n              b: true,\n              test: 'a!=b'\n            }\n          )\n          exercice = resoudre('a*x+7=b*x-3', { variables, color: 'black', comment: true })\n          exercice.texte = `Résoudre : $${exercice.equation}$`\n          exercice.texteCorr = this.correctionDetaillee ? '<br>' + exercice.texteCorr : `La solution est $${exercice.solution}$`\n        }\n          break\n        case 'type6': {\n          const variables = aleaVariables(\n            {\n              a: true,\n              b: true,\n              c: true,\n              d: true,\n              test: 'a!=c'\n            }\n          )\n          // Toutes les étapes sont détaillées avec le paramètre reduceSteps: false\n          exercice = resoudre('a*x+b=c*x+d', { reduceSteps: false, variables, color: 'blue', comment: true })\n          exercice.texte = `Résoudre : $${exercice.equation}$`\n          exercice.texteCorr = `\n          <br>\n          ${exercice.texteCorr}\n          <br>\n          La solution est $${exercice.solution}$.\n          <br>\n          Vérification :\n          <br>\n          D'une part : $${exercice.verifLeftSide.printExpression}=${exercice.verifLeftSide.printResult}$\n          <br>\n          D'autre part : $${exercice.verifRightSide.printExpression}=${exercice.verifRightSide.printResult}$\n          `\n          break\n        }\n      }\n      // Si la question n'a jamais été posée, on l'enregistre\n      if (this.questionJamaisPosee(i, exercice.texte)) { // <- laisser le i et ajouter toutes les variables qui rendent les exercices différents (par exemple a, b, c et d)\n        this.listeQuestions.push(exercice.texte)\n        this.listeCorrections.push(exercice.texteCorr)\n        i++\n      }\n      cpt++\n    }\n    listeQuestionsToContenu(this) // On envoie l'exercice à la fonction de mise en page\n  }\n}\n"],"names":["titre","dateDePublication","dateDeModifImportante","NomExercice","Exercice","listeTypeQuestions","combinaisonListes","i","exercice","cpt","variables","aleaVariables","calculer","polynomeTex","toTex","simplify","discriminantTex","stepscalculsDiscriminant","resoudre","listeQuestionsToContenu"],"mappings":"oMAKY,MAACA,EAAQ,oBAGRC,EAAoB,aACpBC,EAAwB,aAOtB,MAAMC,UAAoBC,CAAS,CAChD,aAAe,CACb,MAAO,EACP,KAAK,MAAQJ,EACb,KAAK,SAAW,WAChB,KAAK,YAAc,EACnB,KAAK,OAAS,EACd,KAAK,WAAa,EAClB,KAAK,MAAQ,EACd,CAED,iBAAmB,CACjB,KAAK,eAAiB,CAAE,EACxB,KAAK,iBAAmB,CAAE,EAC1B,KAAK,eAAiB,CAAE,EAIxB,MAAMK,EAAqBC,EAFM,CAAC,QAAS,QAAS,QAAS,QAAS,QAAS,OAAO,EAEf,KAAK,WAAW,EACvF,QAASC,EAAI,EAAGC,EAAW,CAAA,EAAIC,EAAM,EAAGF,EAAI,KAAK,aAAeE,EAAM,IAAK,CACzE,OAAQJ,EAAmBE,CAAC,EAAC,CAC3B,IAAK,QAAS,CACZ,MAAMG,EAAYC,EAChB,CACE,EAAG,GACH,EAAG,EACJ,CACF,EACDH,EAAWI,EAAS,YAAa,CAAE,UAAAF,EAAW,KAAM,IAAK,EACzDF,EAAS,MAAQ,oDAAoDA,EAAS,IAAI,IAAIA,EAAS,eAAe,IAC9GA,EAAS,UAAY,KAAK,oBAAsB,OAASA,EAAS,UAAY,IAAIA,EAAS,IAAI,IAAIA,EAAS,WAAW,IACvH,KACD,CACD,IAAK,QAAU,CACb,MAAME,EAAYC,EAChB,CACE,EAAG,GACH,EAAG,GACH,EAAG,EACJ,CACF,EACDH,EAAWI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