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/betaTestFraction-rHo9O_t6.js.map
{"version":3,"file":"betaTestFraction-rHo9O_t6.js","sources":["../../src/exercices/beta/betaTestFraction.js"],"sourcesContent":["import { simplificationDeFractionAvecEtapes } from '../../lib/outils/deprecatedFractions.js'\nimport Exercice from '../Exercice.js'\nimport { listeQuestionsToContenu, randint } from '../../modules/outils.js'\nimport FractionEtendue from '../../modules/FractionEtendue.js'\nimport { evaluate, Fraction } from 'mathjs'\nimport { ajouteChampTexteMathLive } from '../../lib/interactif/questionMathLive.js'\nimport * as pkg from '@cortex-js/compute-engine'\nimport { setReponse } from '../../lib/interactif/gestionInteractif.js'\n\nconst { ComputeEngine } = pkg\nexport const interactifReady = true\nexport const interactifType = 'mathLive'\nexport const titre = 'Tester la classe FractionEtendue'\nexport const dateDePublication = '20/03/2022' // La date de publication initiale au format 'jj/mm/aaaa' pour affichage temporaire d'un tag\n\n/**\n * Modèle d'exercice très simple pour la course aux nombres\n * @author Rémi Angot\n * Référence\n */\nexport default function TestFractions () {\n  Exercice.call(this) // Héritage de la classe Exercice()\n  this.nbQuestions = 1\n  this.sup = randint(1, 1000)\n  this.sup2 = randint(2, 1000)\n  // Dans un exercice simple, ne pas mettre de this.listeQuestions = [] ni de this.consigne\n  this.besoinFormulaireTexte = ['numérateur ', '']\n  this.besoinFormulaire2Texte = ['dénominateur ', '']\n  this.nouvelleVersion = function () {\n    const engine = new ComputeEngine({ numericMode: 'decimal', numericPrecision: 30 })\n    const rac3 = engine.parse('\\\\frac{\\\\sqrt{3}}{2}')\n    const sinPiSur3 = engine.parse('\\\\sin(\\\\frac{\\\\pi}{3})')\n    console.log(rac3.valueOf(), sinPiSur3.valueOf())\n\n    this.listeCorrections = []\n    this.listeQuestions = []\n    const a = Number(evaluate(this.sup)) // randint(101, 999) * randint(101, 999) * randint(101, 999) * randint(101, 999)\n    const b = Number(evaluate(this.sup2)) // randint(101, 999) * randint(101, 999) * randint(101, 999) * randint(101, 999) / 10 ** 12\n    const f1 = new FractionEtendue(a, b)\n    const f2 = new Fraction(a, b)\n    setReponse(this, 0, f1.valeurDecimale, { formatInteractif: 'nombreDecimal', decimals: 2 })\n    // console.log(engine.parse(f1.texFSD.replaceAll('dfrac', 'frac')))\n    // console.log('Fraction selon FractionEtendue : ', f1.num, ' / ', f1.den, ' fraction selon Fraction : ', f2.n, ' / ', f2.d)\n    let texte = `Saisir une fraction ou ce que vous voulez (la réponse attendue est $${f1.texFSD}$ et le mode Interactif est : ${this.autoCorrection[0].reponse.param.formatInteractif} avec ${this.autoCorrection[0].reponse.param.decimals} chiffres après la virgule): ` + ajouteChampTexteMathLive(this, 0, 'largeur25 inline')\n    texte += `<br>$${f1.texFractionSR}${f1.texSimplificationAvecEtapes()}$<br><br>`\n    texte += `$${f1.texFractionSR}${simplificationDeFractionAvecEtapes(f1.num, f1.den)}$`\n\n    this.listeQuestions.push(texte)\n    this.listeCorrections.push(`FractionEtendue : $\\\\dfrac{${f1.num}}{${f1.den}}$<br><br>Fraction : $\\\\dfrac{${f2.n}}{${f2.d}}$`)\n\n    listeQuestionsToContenu(this)\n  }\n}\n"],"names":["ComputeEngine","pkg","interactifReady","interactifType","titre","dateDePublication","TestFractions","Exercice","randint","engine","rac3","sinPiSur3","a","evaluate","b","f1","FractionEtendue","f2","Fraction","setReponse","texte","ajouteChampTexteMathLive","simplificationDeFractionAvecEtapes","listeQuestionsToContenu"],"mappings":"mJASA,KAAM,CAAE,cAAAA,CAAe,EAAGC,EACbC,EAAkB,GAClBC,EAAiB,WACjBC,EAAQ,mCACRC,EAAoB,aAOlB,SAASC,GAAiB,CACvCC,EAAS,KAAK,IAAI,EAClB,KAAK,YAAc,EACnB,KAAK,IAAMC,EA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