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/5C12-ogWQQAIT.js.map
{"version":3,"file":"5C12-ogWQQAIT.js","sources":["../../src/exercices/5e/5C12.js"],"sourcesContent":["import { lettreDepuisChiffre, sp } from '../../lib/outils/outilString.js'\nimport { context } from '../../modules/context.js'\nimport { ajouteChampTexteMathLive } from '../../lib/interactif/questionMathLive.js'\nimport { gestionnaireFormulaireTexte, listeQuestionsToContenu, randint } from '../../modules/outils.js'\nimport Exercice from '../Exercice.js'\nimport choisirExpressionNumerique from './_choisirExpressionNumerique.js'\nimport { miseEnEvidence } from '../../lib/outils/embellissements'\nimport { setReponse } from '../../lib/interactif/gestionInteractif.js'\n\nexport const interactifReady = true\nexport const interactifType = 'mathLive'\nexport const amcReady = true\nexport const amcType = 'AMCHybride'\nexport const titre = 'Calculate while respecting operational priorities'\n\n/**\n * @author Jean-Claude Lhote\n */\nexport const uuid = 'e61fc'\nexport const ref = '5C12'\nexport default function CalculerUneExpressionNumerique () {\n  Exercice.call(this) // Héritage de la classe Exercice()\n  this.nbQuestions = 4\n  this.nbCols = 1\n  this.nbColsCorr = 1\n  this.sup = 3\n  this.sup2 = false // si false alors utilisation de nombres entiers (calcul mental), si true alors utilisation de nombres à un chiffre après la virgule.\n  this.sup3 = true\n  this.sup4 = false\n  this.nouvelleVersion = function () {\n    this.autoCorrection = []\n    let reponse\n    this.listeQuestions = [] // Liste de questions\n    this.listeCorrections = [] // Liste de questions corrigées\n    const listeTypeDeQuestions = gestionnaireFormulaireTexte({\n      min: 2,\n      max: 5,\n      defaut: randint(2, 5),\n      nbQuestions: this.nbQuestions,\n      saisie: this.sup\n    })\n\n    let expf\n    let expn\n    let expc\n    let decimal\n    let nbOperations\n    let resultats\n    if (this.sup2) {\n      decimal = 10\n    } else {\n      decimal = 1\n    }\n\n    for (let i = 0, texte, texteCorr, cpt = 0; i < this.nbQuestions && cpt < 50;) {\n      this.autoCorrection[i] = {}\n      nbOperations = listeTypeDeQuestions[i]\n      if (this.version > 2 && nbOperations === 1) nbOperations++\n      resultats = choisirExpressionNumerique(nbOperations, decimal, this.sup3, !this.sup2)\n      expf = resultats[0]\n      expn = resultats[1]\n      expc = resultats[2]\n      if (expn.indexOf('Or') > 0) expn = expn.substring(0, expn.indexOf('Or')) // on supprime la deuxième expression fractionnaire\n      this.consigne = 'Calculate while respecting operational priorities'\n      this.consigne += this.interactif ? '.' : ' and detailing.'\n      if (!this.sup4) {\n        texte = `${expn}`\n      } else {\n        texte = `${lettreDepuisChiffre(i + 1)} = ${expn}`\n      }\n      texteCorr = ''\n      if (!this.sup4) {\n        expc = expc.substring(1, expc.length - 1).split(' =')\n        for (let ee = 0; ee < expc.length - 1; ee++) {\n          texteCorr += `$${expc[ee]} = $` + sp()\n        }\n        texteCorr += `$${miseEnEvidence(expc[expc.length - 1])}$`\n      } else {\n        // We cut\n        const etapes = expc.split('=')\n        let nbEtapes = 0\n        etapes.forEach(function (etape) {\n          nbEtapes++\n          etape = etape.replace('$', '')\n          if (context.isHtml) {\n            texteCorr += '<br>'\n          }\n          texteCorr += `${lettreDepuisChiffre(i + 1)} =`\n          texteCorr += nbEtapes === etapes.length ? `$${miseEnEvidence(etape)}$ <br>` : `$${etape}$ <br>`\n        })\n      }\n      reponse = resultats[4]\n      if (this.questionJamaisPosee(i, expn, expf)) { // Si la question n'a jamais été posée, on en créé une autre\n        if (this.interactif) {\n          texte += ajouteChampTexteMathLive(this, i, 'width25 inline nospacebefore', { texteAvant: '$=$' })\n          setReponse(this, i, reponse)\n        } else if (context.isAmc) {\n          texte += '<br>Detail the calculations in the framework and code the result.<br>'\n          this.autoCorrection[i] = {\n            enonce: '',\n            enonceAvant: false,\n            propositions: [\n              {\n                type: 'AMCOpen',\n                propositions: [{\n                  enonce: texte,\n                  texte: texteCorr,\n                  statut: 3,\n                  pointilles: false\n                }]\n              },\n              {\n                type: 'AMCNum',\n                propositions: [{\n                  texte: '',\n                  statut: '',\n                  reponse: {\n                    texte: 'Result of this sequence of calculations:',\n                    valeur: [reponse],\n                    param: {\n                      digits: 2,\n                      decimals: 0,\n                      signe: false,\n                      approx: 0\n                    }\n                  }\n                }]\n              }\n            ]\n          }\n        }\n        this.listeQuestions.push(texte)\n        this.listeCorrections.push(texteCorr)\n        i++\n      }\n      cpt++\n    }\n    listeQuestionsToContenu(this)\n  }\n  this.besoinFormulaireTexte = ['Choice of expressions', 'Numbers separated by hyphens\\n2: Expressions with two operations\\n3: Expressions with 3 operations\\n4: Expressions with 4 operations\\n5: Complex expressions'] // Texte, tooltip - il faut au moins deux opérations\n  this.besoinFormulaire2CaseACocher = ['Use of decimals (no mental arithmetic)', false]\n  this.besoinFormulaire3CaseACocher = ['With the × sign in front of the parentheses', true]\n  this.besoinFormulaire4CaseACocher = ['Presentation of corrections in columns', false]\n}\n"],"names":["interactifReady","interactifType","amcReady","amcType","titre","uuid","ref","CalculerUneExpressionNumerique","Exercice","reponse","listeTypeDeQuestions","gestionnaireFormulaireTexte","randint","expf","expn","expc","decimal","nbOperations","resultats","i","texte","texteCorr","cpt","choisirExpressionNumerique","lettreDepuisChiffre","etapes","nbEtapes","etape","context","miseEnEvidence","ee","sp","ajouteChampTexteMathLive","setReponse","listeQuestionsToContenu"],"mappings":"kKASY,MAACA,EAAkB,GAClBC,EAAiB,WACjBC,EAAW,GACXC,EAAU,aACVC,EAAQ,oDAKRC,EAAO,QACPC,EAAM,OACJ,SAASC,GAAkC,CACxDC,EAAS,KAAK,IAAI,EAClB,KAAK,YAAc,EACnB,KAAK,OAAS,EACd,KAAK,WAAa,EAClB,KAAK,IAAM,EACX,KAAK,KAAO,GACZ,KAAK,KAAO,GACZ,KAAK,KAAO,GACZ,KAAK,gBAAkB,UAAY,CACjC,KAAK,eAAiB,CA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