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/beta6test2-zZwBO9i8.js.map
{"version":3,"file":"beta6test2-zZwBO9i8.js","sources":["../../src/exercices/beta/beta6test2.js"],"sourcesContent":["import { combinaisonListes } from '../../lib/outils/arrayOutils'\nimport { modalTexteCourt } from '../../lib/outils/modales.js'\nimport Exercice from '../deprecatedExercice.js'\nimport { listeQuestionsToContenu, randint } from '../../modules/outils.js'\n\nexport const titre = 'Mon test'\n\n/**\n * Exercice de test\n * @author\n * Référence 6test2\n*/\nexport default function MaFonctionQuiCreeExercice () {\n  Exercice.call(this) // Héritage de la classe Exercice()\n  this.consigne = 'Calculer'\n  this.nbQuestions = 10\n  this.nbCols = 2 // Nombre de colonnes pour la sortie LaTeX\n  this.nbColsCorr = 2 // Nombre de colonnes dans la correction pour la sortie LaTeX\n\n  this.nouvelleVersion = function (numeroExercice) {\n    this.boutonAide = modalTexteCourt(numeroExercice, 'Ajouter 9 revient à ajouter 10 et à soustraire 1.')\n    this.listeQuestions = [] // Liste de questions\n    this.listeCorrections = [] // Liste de questions corrigées\n\n    let listeTypeDeQuestionsDisponibles\n    this.sup = parseInt(this.sup) // pour s'assurer d'avoir un nombre\n    if (this.sup === 1) {\n      listeTypeDeQuestionsDisponibles = ['niveau1']\n    }\n    if (this.sup === 2) {\n      listeTypeDeQuestionsDisponibles = ['niveau1', 'niveau2', 'niveau2']\n    }\n    if (this.sup === 3) {\n      listeTypeDeQuestionsDisponibles = ['niveau1', 'niveau2', 'niveau3', 'niveau3', 'niveau3']\n    }\n    const listeTypeDeQuestions = combinaisonListes(listeTypeDeQuestionsDisponibles, this.nbQuestions)\n\n    for (let i = 0, texte, texteCorr, a, cpt = 0; i < this.nbQuestions && cpt < 50;) {\n      switch (listeTypeDeQuestions[i]) {\n        case 'niveau1':\n          a = randint(1, 9) * 10 + randint(1, 9)\n          break\n\n        case 'niveau2':\n          a = randint(1, 9) * 100 + randint(0, 9) * 10 + randint(1, 9)\n          break\n\n        case 'niveau3':\n          a = randint(1, 9) * 1000 + randint(0, 9) * 100 + randint(0, 9) * 10 + randint(1, 9)\n          break\n      }\n\n      texte = `$ ${a} + 9 $`\n      texteCorr = `$ ${a} + 9 = ${a + 9} $`\n\n      if (this.listeQuestions.indexOf(texte) === -1) {\n        // Si la question n'a jamais été posée, on en crée une autre\n        this.listeQuestions.push(texte)\n        this.listeCorrections.push(texteCorr)\n        i++\n      }\n      cpt++\n    }\n    listeQuestionsToContenu(this)\n  }\n  this.besoinFormulaireNumerique = ['Niveau de difficulté', 3, '1 : Nombre inférieur à 100 n2 : Nombre inférieur à 1 000\\n3 : Nombre inférieur à 10 000']\n}\n"],"names":["titre","MaFonctionQuiCreeExercice","Exercice","numeroExercice","modalTexteCourt","listeTypeDeQuestionsDisponibles","listeTypeDeQuestions","combinaisonListes","i","texte","texteCorr","a","cpt","randint","listeQuestionsToContenu"],"mappings":"wGAKY,MAACA,EAAQ,WAON,SAASC,GAA6B,CACnDC,EAAS,KAAK,IAAI,EAClB,KAAK,SAAW,WAChB,KAAK,YAAc,GACnB,KAAK,OAAS,EACd,KAAK,WAAa,EAElB,KAAK,gBAAkB,SAAUC,EAAgB,CAC/C,KAAK,WAAaC,EAAgBD,EAAgB,mDAAmD,EACrG,KAAK,eAAiB,CAAE,EACxB,KAAK,iBAAmB,CAAE,EAE1B,IAAIE,EACJ,KAAK,IAAM,SAAS,KAAK,GAAG,EACxB,KAAK,MAAQ,IACfA,EAAkC,CAAC,SAAS,GAE1C,KAAK,MAAQ,IACfA,EAAkC,CAAC,UAAW,UAAW,SAAS,GAEhE,KAAK,MAAQ,IACfA,EAAkC,CAAC,UAAW,UAAW,UAAW,UAAW,SAAS,GAE1F,MAAMC,EAAuBC,EAAkBF,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