Mise à jour ergonomique et fonctionnelle

This commit is contained in:
Valentin Moguérou 2023-07-19 01:34:21 +02:00
parent b51010cd7c
commit a0ba368ff9
11 changed files with 773 additions and 1898 deletions

View File

@ -1,227 +0,0 @@
function update() {
/* ------------- Contrôle continu ------------- */
let total_CC = 0;
// EMC
let note_emc_1re = document.getElementById("note-emc-1re").value;
let points_emc_1re = 1 * note_emc_1re
document.getElementById("points-emc-1re").innerHTML = points_emc_1re.toLocaleString("fr");
total_CC += points_emc_1re;
let note_emc_tle = document.getElementById("note-emc-tle").value;
let points_emc_tle = 1 * note_emc_tle
document.getElementById("points-emc-tle").innerHTML = points_emc_tle.toLocaleString("fr");
total_CC += points_emc_tle;
// HG
let note_hg_1re = document.getElementById("note-hg-1re").value;
let points_hg_1re = 3 * note_hg_1re
document.getElementById("points-hg-1re").innerHTML = points_hg_1re.toLocaleString("fr");
total_CC += points_hg_1re;
let note_hg_tle = document.getElementById("note-hg-tle").value;
let points_hg_tle = 3 * note_hg_tle
document.getElementById("points-hg-tle").innerHTML = points_hg_tle.toLocaleString("fr");
total_CC += points_hg_tle;
// LVA
let note_lva_1re = document.getElementById("note-lva-1re").value;
let points_lva_1re = 3 * note_lva_1re
document.getElementById("points-lva-1re").innerHTML = points_lva_1re.toLocaleString("fr");
total_CC += points_lva_1re;
let note_lva_tle = document.getElementById("note-lva-tle").value;
let points_lva_tle = 3 * note_lva_tle
document.getElementById("points-lva-tle").innerHTML = points_lva_tle.toLocaleString("fr");
total_CC += points_lva_tle;
// LVB
let note_lvb_1re = document.getElementById("note-lvb-1re").value;
let points_lvb_1re = 3 * note_lvb_1re
document.getElementById("points-lvb-1re").innerHTML = points_lvb_1re.toLocaleString("fr");
total_CC += points_lvb_1re;
let note_lvb_tle = document.getElementById("note-lvb-tle").value;
let points_lvb_tle = 3 * note_lvb_tle
document.getElementById("points-lvb-tle").innerHTML = points_lvb_tle.toLocaleString("fr");
total_CC += points_lvb_tle;
// ES
let note_es_1re = document.getElementById("note-es-1re").value;
let points_es_1re = 3 * note_es_1re
document.getElementById("points-es-1re").innerHTML = points_es_1re.toLocaleString("fr");
total_CC += points_es_1re;
let note_es_tle = document.getElementById("note-es-tle").value;
let points_es_tle = 3 * note_es_tle
document.getElementById("points-es-tle").innerHTML = points_es_tle.toLocaleString("fr");
total_CC += points_es_tle;
// EPS
let note_eps_tle = document.getElementById("note-eps-tle").value;
let points_eps_tle = 6 * note_eps_tle
document.getElementById("points-eps-tle").innerHTML = points_eps_tle.toLocaleString("fr");
total_CC += points_eps_tle;
// Spé 3
let note_spe3_1re = document.getElementById("note-spe3-1re").value;
let points_spe3_1re = 8 * note_spe3_1re
document.getElementById("points-spe3-1re").innerHTML = points_spe3_1re.toLocaleString("fr");
total_CC += points_spe3_1re;
document.getElementById("total-points-CC").innerHTML = total_CC.toLocaleString("fr")
/* ------------- Épreuves terminales ------------- */
let total_terminal = 0;
// Français écrit
let note_fr_ecrit = document.getElementById("note-fr-ecrit").value;
let points_fr_ecrit = 5 * note_fr_ecrit
document.getElementById("points-fr-ecrit").innerHTML = points_fr_ecrit.toLocaleString("fr");
total_terminal += points_fr_ecrit;
// Français oral
let note_fr_oral = document.getElementById("note-fr-oral").value;
let points_fr_oral = 5 * note_fr_oral
document.getElementById("points-fr-oral").innerHTML = points_fr_oral.toLocaleString("fr");
total_terminal += points_fr_oral;
// Philosophie
let note_philo = document.getElementById("note-philo").value;
let points_philo = 8 * note_philo
document.getElementById("points-philo").innerHTML = points_philo.toLocaleString("fr");
total_terminal += points_philo;
// Grand oral
let note_go = document.getElementById("note-go").value;
let points_go = 10 * note_go
document.getElementById("points-go").innerHTML = points_go.toLocaleString("fr");
total_terminal += points_go;
// Spé 1
let note_spe1 = document.getElementById("note-spe1").value;
let points_spe1 = 16 * note_spe1
document.getElementById("points-spe1").innerHTML = points_spe1.toLocaleString("fr");
total_terminal += points_spe1;
// Spé 2
let note_spe2 = document.getElementById("note-spe2").value;
let points_spe2 = 16 * note_spe2
document.getElementById("points-spe2").innerHTML = points_spe2.toLocaleString("fr");
total_terminal += points_spe2;
document.getElementById("total-points-terminal").innerHTML = total_terminal.toLocaleString("fr")
/* ------------- Options ------------- */
let total_options = 0;
let coef_options = 0;
if (document.getElementById("check-lca-1re").checked) {
document.getElementById("coef-lca-1re").innerHTML = "2";
coef_options += 2;
let points_lca_1re = 2*document.getElementById("note-lca-1re").value;
total_options += points_lca_1re;
document.getElementById("points-lca-1re").innerHTML = points_lca_1re.toLocaleString("fr");
} else {
document.getElementById("coef-lca-1re").innerHTML = "<del>2</del>";
document.getElementById("points-lca-1re").innerHTML = "0";
}
if (document.getElementById("check-lca-tle").checked) {
document.getElementById("coef-lca-tle").innerHTML = "2";
coef_options += 2;
let points_lca_tle = 2*document.getElementById("note-lca-tle").value;
total_options += points_lca_tle;
document.getElementById("points-lca-tle").innerHTML = points_lca_tle.toLocaleString("fr");
} else {
document.getElementById("coef-lca-tle").innerHTML = "<del>2</del>";
document.getElementById("points-lca-tle").innerHTML = "0";
}
if (document.getElementById("check-opt1-1re").checked) {
document.getElementById("coef-opt1-1re").innerHTML = "2";
coef_options += 2;
let points_opt1_1re = 2*document.getElementById("note-opt1-1re").value;
total_options += points_opt1_1re;
document.getElementById("points-opt1-1re").innerHTML = points_opt1_1re.toLocaleString("fr");
} else {
document.getElementById("coef-opt1-1re").innerHTML = "<del>2</del>";
document.getElementById("points-opt1-1re").innerHTML = "0";
}
if (document.getElementById("check-opt1-tle").checked) {
document.getElementById("coef-opt1-tle").innerHTML = "2";
coef_options += 2;
let points_opt1_tle = 2*document.getElementById("note-opt1-tle").value;
total_options += points_opt1_tle;
document.getElementById("points-opt1-tle").innerHTML = points_opt1_tle.toLocaleString("fr");
} else {
document.getElementById("coef-opt1-tle").innerHTML = "<del>2</del>";
document.getElementById("points-opt1-tle").innerHTML = "0";
}
if (document.getElementById("check-opt2").checked) {
document.getElementById("coef-opt2").innerHTML = "2";
coef_options += 2;
let points_opt2 = 2*document.getElementById("note-opt2").value;
total_options += points_opt2;
document.getElementById("points-opt2").innerHTML = points_opt2.toLocaleString("fr");
} else {
document.getElementById("coef-opt2").innerHTML = "<del>2</del>";
document.getElementById("points-opt2").innerHTML = "0";
}
document.getElementById("total-coef-options").innerHTML = coef_options.toLocaleString("fr");
document.getElementById("total-points-options").innerHTML = total_options.toLocaleString("fr");
// CALCUL
let total_points = total_CC + total_terminal + total_options;
document.getElementById("total-points").innerHTML = total_points.toLocaleString("fr");
let total_coef = 100 + coef_options;
document.getElementById("total-coef").innerHTML = total_coef.toLocaleString("fr");
let note_brute = total_points/total_coef;
let note_finale = Math.ceil(100*note_brute)/100;
document.getElementById("note-finale").innerHTML = note_finale.toLocaleString("fr");
let decision;
let sup_mention_actuelle;
if (note_finale < 8) {
decision = "Ajourné"
sup_mention_actuelle = 7.99*total_coef
} else if (note_finale < 10) {
decision = "Passe le second groupe";
sup_mention_actuelle = 9.99*total_coef
} else if (note_finale < 12) {
decision = "Admis";
sup_mention_actuelle = 11.99*total_coef
} else if (note_finale < 14) {
decision = "Admis Mention Assez Bien";
sup_mention_actuelle = 13.99*total_coef
} else if (note_finale < 16) {
decision = "Admis Mention Bien";
sup_mention_actuelle = 15.99*total_coef
} else if (note_finale < 18) {
decision = "Admis Mention Très Bien";
sup_mention_actuelle = 17.99*total_coef
} else {
decision = "Admis Mention Très Bien avec les félicitations du jury";
sup_mention_actuelle = NaN
}
if (note_finale < 18) {
let points_mention_suivante = Math.ceil(10*(sup_mention_actuelle - total_points + .01))/10
document.getElementById("points-manquants").innerHTML = points_mention_suivante.toLocaleString("fr");
} else {
document.getElementById("points-manquants").innerHTML = "-";
}
document.getElementById("decision-jury").innerHTML = decision;
}

View File

@ -12,7 +12,8 @@
<meta name="og:description" property="Calculez votre mention au Bac général en fonction de vos notes, ou déterminez le nombre de points qu'il vous manque pour en obtenir une en utilisant le simulateur du BCG de WikiBac."> <meta name="og:description" property="Calculez votre mention au Bac général en fonction de vos notes, ou déterminez le nombre de points qu'il vous manque pour en obtenir une en utilisant le simulateur du BCG de WikiBac.">
<meta property="og:image" content="https://simulation.wikibac.fr/res/logo.png"> <meta property="og:image" content="https://simulation.wikibac.fr/res/logo.png">
<link href="../res/style.css" rel="stylesheet" type="text/css"> <link href="../res/style.css" rel="stylesheet" type="text/css">
<script src="calcul.js"></script> <script src="../res/calcul.js"></script>
<script src="update.js"></script>
</head> </head>
<body onload="update()"> <body onload="update()">
<header> <header>
@ -55,376 +56,160 @@
<a href="https://www.legifrance.gouv.fr/codes/section_lc/LEGITEXT000006071191/LEGISCTA000006151440?anchor=LEGIARTI000039308580" target="_blank">En savoir plus</a> <a href="https://www.legifrance.gouv.fr/codes/section_lc/LEGITEXT000006071191/LEGISCTA000006151440?anchor=LEGIARTI000039308580" target="_blank">En savoir plus</a>
</div> </div>
<form onchange="update()" id="calculateur"> <form onchange="update()" id="simulateur">
<fieldset> <div class="ln head">
<legend>Contrôle continu</legend> <div>Matière</div>
<div>Coef.</div>
<p> <div>Première</div>
Pour les notes empruntées au livret scolaire (c'est-à-dire la moyenne de l'année), <div>Terminale</div>
il faut arrondir la note au dixième à l'excès&nbsp;: par exemple, pour une moyenne annuelle de 16,54, <div>Points</div>
il faut arrondir à 16,6. </div>
</p> <h2>Contrôle continu</h2>
<div class="section">
<div class="table_wrapper"> <div class="ln">
<table> <div>Enseignement moral et civique</div>
<tr> <div>2</div>
<th rowspan="2">Matière</th> <div><input type="number" min=0 max=20 step=.1 name="EMC-1re-note" id="EMC-1re-note"
<th colspan="3">Première</th> aria-label="Note d'enseignement moral et civique de première" required></div>
<th colspan="3">Terminale</th> <div><input type="number" min=0 max=20 step=.1 name="EMC-tle-note" id="EMC-tle-note"
</tr> aria-label="Note d'enseignement moral et civique de terminale" required></div>
<tr> <div id="EMC-points"></div>
<th>Coef.</th>
<th>Note</th>
<th>Points</th>
<th>Coef.</th>
<th>Note</th>
<th>Points</th>
</tr>
<tr>
<td>Enseignement moral et civique</td>
<td>1</td>
<td>
<label for="note-emc-1re">Note d'EMC de première</label>
<input type="number" name="note-emc-1re"
id="note-emc-1re" class="note" min="0" max="20" step=".1" required>
</td>
<td>
<span id="points-emc-1re"></span>
</td>
<td>1</td>
<td>
<label for="note-emc-tle">Note d'EMC de terminale</label>
<input type="number" name="note-emc-tle"
id="note-emc-tle" class="note" min="0" max="20" step=".1" required>
</td>
<td>
<span id="points-emc-tle"></span>
</td>
</tr>
<tr>
<td>Langue vivante A</td>
<td>3</td>
<td>
<label for="note-lva-1re">Note de LVA de première</label>
<input type="number" name="note-lva-1re"
id="note-lva-1re" class="note" min="0" max="20" step=".1" required>
</td>
<td>
<span id="points-lva-1re"></span>
</td>
<td>3</td>
<td>
<label for="note-lva-tle">Note de LVA de terminale</label>
<input type="number" name="note-lva-tle"
id="note-lva-tle" class="note" min="0" max="20" step=".1" required>
</td>
<td>
<span id="points-lva-tle"></span>
</td>
</tr>
<tr>
<td>Langue vivante B</td>
<td>3</td>
<td>
<label for="note-lvb-1re">Note de LVB de première</label>
<input type="number" name="note-lvb-1re"
id="note-lvb-1re" class="note" min="0" max="20" step=".1" required>
</td>
<td>
<span id="points-lvb-1re"></span>
</td>
<td>3</td>
<td>
<label for="note-lvb-tle">Note de LVB de terminale</label>
<input type="number" name="note-lvb-tle"
id="note-lvb-tle" class="note" min="0" max="20" step=".1" required>
</td>
<td>
<span id="points-lvb-tle"></span>
</td>
</tr>
<tr>
<td>Histoire-géographie</td>
<td>3</td>
<td>
<label for="note-hg-1re">Note d'histoire-géographie de première</label>
<input type="number" name="note-hg-1re"
id="note-hg-1re" class="note" min="0" max="20" step=".1" required>
</td>
<td>
<span id="points-hg-1re"></span>
</td>
<td>3</td>
<td>
<label for="note-hg-tle">Note d'histoire-géographie de terminale</label>
<input type="number" name="note-hg-tle"
id="note-hg-tle" class="note" min="0" max="20" step=".1" required>
</td>
<td>
<span id="points-hg-tle"></span>
</td>
</tr>
<tr>
<td>Enseignement scientifique</td>
<td>3</td>
<td>
<label for="note-es-1re">Note d'enseignement scientifique de première</label>
<input type="number" name="note-es-1re"
id="note-es-1re" class="note" min="0" max="20" step=".1" required>
</td>
<td>
<span id="points-es-1re"></span>
</td>
<td>3</td>
<td>
<label for="note-es-tle">Note d'enseignement scientifique de terminale</label>
<input type="number" name="note-es-1re"
id="note-es-tle" class="note" min="0" max="20" step=".1" required>
</td>
<td>
<span id="points-es-tle"></span>
</td>
</tr>
<tr>
<td>Éducation physique et sportive</td>
<td colspan="3" class="null"></td>
<td>6</td>
<td>
<label for="note-eps-tle">Note d'EPS</label>
<input type="number" name="note-eps-tle"
id="note-eps-tle" class="note" min="0" max="20" step="1" required>
</td>
<td>
<span id="points-eps-tle"></span>
</td>
</tr>
<tr>
<td>Spécialité 3 abandonnée</td>
<td>8</td>
<td>
<label for="note-spe3-1re">Note de spécialité abandonnée en classe de première</label>
<input type="number" name="note-spe3-1re"
id="note-spe3-1re" class="note" min="0" max="20" step=".1" required>
</td>
<td>
<span id="points-spe3-1re"></span>
</td>
<td colspan="3" class="null"></td>
</tr>
<tr class="total">
<td>Totaux</td>
<td colspan="3">Total des coefficients&nbsp;: 40</td>
<td colspan="3">Total des points&nbsp;: <span id="total-points-CC">0</span></td>
</tr>
</table>
</div> </div>
</fieldset> <div class="ln">
<fieldset> <div>Langue vivante A</div>
<legend>Épreuves terminales</legend> <div>6</div>
<div><input type="number" min=0 max=20 step=.1 name="LVA-1re-note" id="LVA-1re-note"
<p>Remarque&nbsp;: Seules ces épreuves peuvent faire l'objet d'un éventuel rattrapage (sauf épreuve orale terminale).</p> aria-label="Note de langue vivante A de première" required></div>
<div><input type="number" min=0 max=20 step=.1 name="LVA-tle-note" id="LVA-tle-note"
<div class="table_wrapper"> aria-label="Note de langue vivante A de terminale" required></div>
<table> <div id="LVA-points"></div>
<tr>
<th rowspan="2">Matière</th>
<th rowspan="2">Coef.</th>
<th colspan="2">1<sup>er</sup> groupe</th>
</tr>
<tr>
<th>Note</th>
<th>Points</th>
</tr>
<tr>
<td>Français écrit</td>
<td>5</td>
<td>
<label for="note-fr-ecrit">Note de français oral</label>
<input type="number" name="note-fr-ecrit"
id="note-fr-ecrit" class="note" min="0" max="20" step="1" required>
</td>
<td>
<span id="points-fr-ecrit"></span>
</td>
</tr>
<tr>
<td>Français oral</td>
<td>5</td>
<td>
<label for="note-fr-oral">Note de français oral</label>
<input type="number" name="note-fr-oral"
id="note-fr-oral" class="note" min="0" max="20" step="1" required>
</td>
<td>
<span id="points-fr-oral"></span>
</td>
</tr>
<tr>
<td>Philosophie</td>
<td>8</td>
<td>
<label for="note-philo">Note de philosophie</label>
<input type="number" name="note-philo"
id="note-philo" class="note" min="0" max="20" step="1" required>
</td>
<td>
<span id="points-philo"></span>
</td>
</tr>
<tr>
<td>Épreuve orale terminale (Grand oral)</td>
<td>10</td>
<td>
<label for="note-go">Note du Grand Oral</label>
<input type="number" name="note-go"
id="note-go" class="note" min="0" max="20" step="1" required>
</td>
<td>
<span id="points-go"></span>
</td>
</tr>
<tr>
<td>Spécialité 1</td>
<td>16</td>
<td>
<label for="note-spe1">Note de français oral</label>
<input type="number" name="note-spe1"
id="note-spe1" class="note" min="0" max="20" step="1" required>
</td>
<td>
<span id="points-spe1"></span>
</td>
</tr>
<tr>
<td>Spécialité 2</td>
<td>16</td>
<td>
<label for="note-spe2">Note de français oral</label>
<input type="number" name="note-spe2"
id="note-spe2" class="note" min="0" max="20" step="1" required>
</td>
<td>
<span id="points-spe2"></span>
</td>
</tr>
<tr class="total">
<td>Totaux</td>
<td>60</td>
<td></td>
<td><span id="total-points-terminal"></span></td>
</tr>
</table>
</div> </div>
</fieldset> <div class="ln">
<fieldset> <div>Langue vivante B</div>
<legend>Option(s)</legend> <div>6</div>
<div><input type="number" min=0 max=20 step=.1 name="LVB-1re-note" id="LVB-1re-note"
<p> aria-label="Note de langue vivante B de première" required></div>
Pour les notes empruntées au livret scolaire (c'est-à-dire la moyenne de l'année), <div><input type="number" min=0 max=20 step=.1 name="LVB-tle-note" id="LVB-tle-note"
il faut arrondir la note au dixième à l'excès&nbsp;: par exemple, pour une moyenne annuelle de 16,54, aria-label="Note de langue vivante B de terminale" required></div>
il faut arrondir à 16,6. <div id="LVB-points"></div>
</p>
<div class="table_wrapper">
<table>
<tr>
<th rowspan="2">Matière</th>
<th colspan="4">Première</th>
<th colspan="4">Terminale</th>
</tr>
<tr>
<th>?</th>
<th>Coef.</th>
<th>Note</th>
<th>Points</th>
<th>?</th>
<th>Coef.</th>
<th>Note</th>
<th>Points</th>
</tr>
<tr>
<td>Langues et cultures de l'Antiquité</td>
<td>
<label for="check-lca-1re">Activation LCA, première</label>
<input type="checkbox" name="check-lca-1re" id="check-lca-1re">
</td>
<td id="coef-lca-1re">2</td>
<td>
<label for="note-lca-1re">Note de langues et cultures de l'Antiquité - première</label>
<input type="number" name="note-lca-1re"
id="note-lca-1re" class="note" min="0" max="20" step=".1">
</td>
<td>
<span id="points-lca-1re"></span>
</td>
<td>
<label for="check-lca-tle">Activation LCA, terminale</label>
<input type="checkbox" name="check-lca-tle" id="check-lca-tle">
</td>
<td id="coef-lca-tle">2</td>
<td>
<label for="note-lca-tle">Note d'option suivie au cours du cycle terminal - terminale</label>
<input type="number" name="note-lca-tle"
id="note-lca-tle" class="note" min="0" max="20" step=".1">
</td>
<td>
<span id="points-lca-tle"></span>
</td>
</tr>
<tr>
<td>Option suivie au cours du cycle terminal (ex: Arts/LV3)</td>
<td>
<label for="check-opt1-1re">Activation option 1, première</label>
<input type="checkbox" name="check-opt1-1re" id="check-opt1-1re">
</td>
<td id="coef-opt1-1re">2</td>
<td>
<label for="note-opt1-1re">Note d'option suivie au cours du cycle terminal - première</label>
<input type="number" name="note-opt1-1re"
id="note-opt1-1re" class="note" min="0" max="20" step=".1">
</td>
<td>
<span id="points-opt1-1re"></span>
</td>
<td>
<label for="check-opt1-tle">Activation option 1, terminale</label>
<input type="checkbox" name="check-opt1-tle" id="check-opt1-tle">
</td>
<td id="coef-opt1-tle">2</td>
<td>
<label for="note-opt1-tle">Note d'option suivie au cours du cycle terminal - terminale</label>
<input type="number" name="note-opt1-tle"
id="note-opt1-tle" class="note" min="0" max="20" step=".1">
</td>
<td>
<span id="points-opt1-tle"></span>
</td>
</tr>
<tr>
<td>Option suivie uniquement en classe de Terminale (ex: Maths/DGEMC)</td>
<td colspan="4" class="null"></td>
<td>
<label for="check-opt2">Activation option 2</label>
<input type="checkbox" name="check-opt2" id="check-opt2">
</td>
<td id="coef-opt2">2</td>
<td>
<label for="note-opt2">Note d'option suivie uniquement en classe de Terminale</label>
<input type="number" name="note-opt2"
id="note-opt2" class="note" min="0" max="20" step=".1">
</td>
<td>
<span id="points-opt2"></span>
</td>
</tr>
<tr class="total">
<td>Totaux</td>
<td colspan="4">Total des coefficients : <span id="total-coef-options">-</span></td>
<td colspan="4">Total des points : <span id="total-points-options">-</span></td>
</tr>
</table>
</div> </div>
</fieldset> <div class="ln">
<div>Enseignement scientifique</div>
<div>6</div>
<div><input type="number" min=0 max=20 step=.1 name="ES-1re-note" id="ES-1re-note"
aria-label="Note d'enseignement scientifique de première" required></div>
<div><input type="number" min=0 max=20 step=.1 name="ES-tle-note" id="ES-tle-note"
aria-label="Note d'enseignement scientifique de terminale" required></div>
<div id="ES-points"></div>
</div>
<div class="ln">
<div>Histoire-géographie</div>
<div>6</div>
<div><input type="number" min=0 max=20 step=.1 name="HG-1re-note" id="HG-1re-note"
aria-label="Note d'histoire-géographie de première" required></div>
<div><input type="number" min=0 max=20 step=.1 name="HG-tle-note" id="HG-tle-note"
aria-label="Note d'histoire-géographie de terminale" required></div>
<div id="HG-points"></div>
</div>
<div class="ln">
<div>Éducation physique et sportive</div>
<div>6</div>
<div class="null"></div>
<div><input type="number" min=0 max=20 step=1 name="EPS-note" id="EPS-note"
aria-label="Note d'éducation physique et sportive" required></div>
<div id="EPS-points"></div>
</div>
<div class="ln">
<div>Spécialité 3 abandonnée</div>
<div>8</div>
<div><input type="number" min=0 max=20 step=.1 name="SP3-note" id="SP3-note"
aria-label="Note de spécialité 3 abandonnée" required></div>
<div class="null"></div>
<div id="SP3-points"></div>
</div>
</div>
<h2>Épreuves terminales</h2>
<div class="section">
<div class="ln">
<div>Français - écrit</div>
<div>5</div>
<div><input type="number" min=0 max=20 step=1 name="FR-ecrit-note" id="FR-ecrit-note"
aria-label="Note de français écrit" required></div>
<div class="null"></div>
<div id="FR-ecrit-points"></div>
</div>
<div class="ln">
<div>Français - oral</div>
<div>5</div>
<div><input type="number" min=0 max=20 step=1 name="FR-oral-note" id="FR-oral-note"
aria-label="Note de français oral" required></div>
<div class="null"></div>
<div id="FR-oral-points"></div>
</div>
<div class="ln">
<div>Philosophie</div>
<div>8</div>
<div class="null"></div>
<div><input type="number" min=0 max=20 step=1 name="PHILO-note" id="PHILO-note"
aria-label="Note de philosophie" required></div>
<div id="PHILO-points"></div>
</div>
<div class="ln">
<div>Épreuve orale terminale (Grand oral)</div>
<div>10</div>
<div class="null"></div>
<div><input type="number" min=0 max=20 step=1 name="GO-note" id="GO-note"
aria-label="Note du grand oral" required></div>
<div id="GO-points"></div>
</div>
<div class="ln">
<div>Spécialité 1</div>
<div>16</div>
<div class="null"></div>
<div><input type="number" min=0 max=20 step=1 name="SP1-note" id="SP1-note"
aria-label="Note de spécialité 1" required></div>
<div id="SP1-points"></div>
</div>
<div class="ln">
<div>Spécialité 2</div>
<div>16</div>
<div class="null"></div>
<div><input type="number" min=0 max=20 step=1 name="SP2-note" id="SP2-note"
aria-label="Note de spécialité 2" required></div>
<div id="SP2-points"></div>
</div>
</div>
<h2>Options</h2>
<div class="section">
<div class="ln">
<div>Langues et cultures de l'Antiquité</div>
<div>4</div>
<div><input type="number" min=0 max=20 step=.1 name="LCA-1re-note" id="LCA-1re-note"
aria-label="Note de langues et cultures de l'Antiquité de première"></div>
<div><input type="number" min=0 max=20 step=.1 name="LCA-tle-note" id="LCA-tle-note"
aria-label="Note de langues et cultures de l'Antiquité de terminale"></div>
<div id="LCA-points"></div>
</div>
<div class="ln">
<div>Option suivie au cours du cycle terminal</div>
<div>4</div>
<div><input type="number" min=0 max=20 step=.1 name="OPT1-1re-note" id="OPT1-1re-note"
aria-label="Note d'option suivie au cours du cycle terminal de première"></div>
<div><input type="number" min=0 max=20 step=.1 name="OPT1-tle-note" id="OPT1-tle-note"
aria-label="Note d'option suivie au cours du cycle terminal de terminale"></div>
<div id="OPT1-points"></div>
</div>
<div class="ln">
<div>Option suivie uniquement en classe de terminale</div>
<div>2</div>
<div class="null"></div>
<div><input type="number" min=0 max=20 step=.1 name="OPT2-note" id="OPT2-note"
aria-label="Note d'option suivie en classe de terminale"></div>
<div id="OPT2-points"></div>
</div>
</div>
</form> </form>
</div> </div>
</main> </main>

31
BCG/update.js Executable file
View File

@ -0,0 +1,31 @@
function update() {
let controle_continu = calcul_section([
{ code: 'EMC', entries: ['EMC-1re', 'EMC-tle'], coef: 1 },
{ code: 'LVA', entries: ['LVA-1re', 'LVA-tle'], coef: 3 },
{ code: 'LVB', entries: ['LVB-1re', 'LVB-tle'], coef: 3 },
{ code: 'ES', entries: ['ES-1re', 'ES-tle'], coef: 3 },
{ code: 'HG', entries: ['HG-1re', 'HG-tle'], coef: 3 },
{ code: 'EPS', entries: ['EPS'], coef: 6 },
{ code: 'SP3', entries: ['SP3'], coef: 8 },
]);
let epreuves_terminales = calcul_section([
{ code: 'FR-ecrit', entries: ["FR-ecrit"], coef: 5 },
{ code: 'FR-oral', entries: ["FR-oral"], coef: 5 },
{ code: 'PHILO', entries: ["PHILO"], coef: 8 },
{ code: 'GO', entries: ["GO"], coef: 10 },
{ code: 'SP1', entries: ["SP1"], coef: 16 },
{ code: 'SP2', entries: ["SP2"], coef: 16 },
]);
let options = calcul_section([
{ code: 'LCA', entries: ["LCA-1re", "LCA-tle"], coef: 2 },
{ code: 'OPT1', entries: ["OPT1-1re", "OPT1-tle"], coef: 2 },
{ code: 'OPT2', entries: ["OPT2"], coef: 2 },
])
let points = controle_continu.points + epreuves_terminales.points + options.points;
let coefficients = controle_continu.coefficients + epreuves_terminales.coefficients + options.coefficients;
decider(points, coefficients);
}

View File

@ -1,216 +0,0 @@
function update() {
/* ------------- Contrôle continu ------------- */
let total_CC = 0;
// EMC
let note_emc_1re = document.getElementById("note-emc-1re").value;
let points_emc_1re = 1 * note_emc_1re
document.getElementById("points-emc-1re").innerHTML = points_emc_1re.toLocaleString("fr");
total_CC += points_emc_1re;
let note_emc_tle = document.getElementById("note-emc-tle").value;
let points_emc_tle = 1 * note_emc_tle
document.getElementById("points-emc-tle").innerHTML = points_emc_tle.toLocaleString("fr");
total_CC += points_emc_tle;
// HG
let note_hg_1re = document.getElementById("note-hg-1re").value;
let points_hg_1re = 3 * note_hg_1re
document.getElementById("points-hg-1re").innerHTML = points_hg_1re.toLocaleString("fr");
total_CC += points_hg_1re;
let note_hg_tle = document.getElementById("note-hg-tle").value;
let points_hg_tle = 3 * note_hg_tle
document.getElementById("points-hg-tle").innerHTML = points_hg_tle.toLocaleString("fr");
total_CC += points_hg_tle;
// LVA
let note_lva_1re = document.getElementById("note-lva-1re").value;
let points_lva_1re = 3 * note_lva_1re
document.getElementById("points-lva-1re").innerHTML = points_lva_1re.toLocaleString("fr");
total_CC += points_lva_1re;
let note_lva_tle = document.getElementById("note-lva-tle").value;
let points_lva_tle = 3 * note_lva_tle
document.getElementById("points-lva-tle").innerHTML = points_lva_tle.toLocaleString("fr");
total_CC += points_lva_tle;
// LVB
let note_lvb_1re = document.getElementById("note-lvb-1re").value;
let points_lvb_1re = 3 * note_lvb_1re
document.getElementById("points-lvb-1re").innerHTML = points_lvb_1re.toLocaleString("fr");
total_CC += points_lvb_1re;
let note_lvb_tle = document.getElementById("note-lvb-tle").value;
let points_lvb_tle = 3 * note_lvb_tle
document.getElementById("points-lvb-tle").innerHTML = points_lvb_tle.toLocaleString("fr");
total_CC += points_lvb_tle;
// Mathématiques
let note_mat_1re = document.getElementById("note-mat-1re").value;
let points_mat_1re = 3 * note_mat_1re
document.getElementById("points-mat-1re").innerHTML = points_mat_1re.toLocaleString("fr");
total_CC += points_mat_1re;
let note_mat_tle = document.getElementById("note-mat-tle").value;
let points_mat_tle = 3 * note_mat_tle
document.getElementById("points-mat-tle").innerHTML = points_mat_tle.toLocaleString("fr");
total_CC += points_mat_tle;
// EPS
let note_eps_tle = document.getElementById("note-eps-tle").value;
let points_eps_tle = 6 * note_eps_tle
document.getElementById("points-eps-tle").innerHTML = points_eps_tle.toLocaleString("fr");
total_CC += points_eps_tle;
// Spé 3
let note_spe3_1re = document.getElementById("note-spe3-1re").value;
let points_spe3_1re = 8 * note_spe3_1re
document.getElementById("points-spe3-1re").innerHTML = points_spe3_1re.toLocaleString("fr");
total_CC += points_spe3_1re;
document.getElementById("total-points-CC").innerHTML = total_CC.toLocaleString("fr")
/* ------------- Épreuves terminales ------------- */
let total_terminal = 0;
// Français écrit
let note_fr_ecrit = document.getElementById("note-fr-ecrit").value;
let points_fr_ecrit = 5 * note_fr_ecrit
document.getElementById("points-fr-ecrit").innerHTML = points_fr_ecrit.toLocaleString("fr");
total_terminal += points_fr_ecrit;
// Français oral
let note_fr_oral = document.getElementById("note-fr-oral").value;
let points_fr_oral = 5 * note_fr_oral
document.getElementById("points-fr-oral").innerHTML = points_fr_oral.toLocaleString("fr");
total_terminal += points_fr_oral;
// Philosophie
let note_philo = document.getElementById("note-philo").value;
let points_philo = 4 * note_philo
document.getElementById("points-philo").innerHTML = points_philo.toLocaleString("fr");
total_terminal += points_philo;
// Grand oral
let note_go = document.getElementById("note-go").value;
let points_go = 14 * note_go
document.getElementById("points-go").innerHTML = points_go.toLocaleString("fr");
total_terminal += points_go;
// Spé 1
let note_spe1 = document.getElementById("note-spe1").value;
let points_spe1 = 16 * note_spe1
document.getElementById("points-spe1").innerHTML = points_spe1.toLocaleString("fr");
total_terminal += points_spe1;
// Spé 2
let note_spe2 = document.getElementById("note-spe2").value;
let points_spe2 = 16 * note_spe2
document.getElementById("points-spe2").innerHTML = points_spe2.toLocaleString("fr");
total_terminal += points_spe2;
document.getElementById("total-points-terminal").innerHTML = total_terminal.toLocaleString("fr")
/* ------------- Options ------------- */
let total_options = 0;
let coef_options = 0;
if (document.getElementById("check-opt1-1re").checked) {
document.getElementById("coef-opt1-1re").innerHTML = "2";
coef_options += 2;
let points_opt1_1re = 2*document.getElementById("note-opt1-1re").value;
total_options += points_opt1_1re;
document.getElementById("points-opt1-1re").innerHTML = points_opt1_1re.toLocaleString("fr");
} else {
document.getElementById("coef-opt1-1re").innerHTML = "<del>2</del>";
document.getElementById("points-opt1-1re").innerHTML = "0";
}
if (document.getElementById("check-opt1-tle").checked) {
document.getElementById("coef-opt1-tle").innerHTML = "2";
coef_options += 2;
let points_opt1_tle = 2*document.getElementById("note-opt1-tle").value;
total_options += points_opt1_tle;
document.getElementById("points-opt1-tle").innerHTML = points_opt1_tle.toLocaleString("fr");
} else {
document.getElementById("coef-opt1-tle").innerHTML = "<del>2</del>";
document.getElementById("points-opt1-tle").innerHTML = "0";
}
if (document.getElementById("check-opt2-1re").checked) {
document.getElementById("coef-opt2-1re").innerHTML = "2";
coef_options += 2;
let points_opt2_1re = 2*document.getElementById("note-opt2-1re").value;
total_options += points_opt2_1re;
document.getElementById("points-opt2-1re").innerHTML = points_opt2_1re.toLocaleString("fr");
} else {
document.getElementById("coef-opt2-1re").innerHTML = "<del>2</del>";
document.getElementById("points-opt2-1re").innerHTML = "0";
}
if (document.getElementById("check-opt2-tle").checked) {
document.getElementById("coef-opt2-tle").innerHTML = "2";
coef_options += 2;
let points_opt2_tle = 2*document.getElementById("note-opt2-tle").value;
total_options += points_opt2_tle;
document.getElementById("points-opt2-tle").innerHTML = points_opt2_tle.toLocaleString("fr");
} else {
document.getElementById("coef-opt2-tle").innerHTML = "<del>2</del>";
document.getElementById("points-opt2-tle").innerHTML = "0";
}
document.getElementById("total-coef-options").innerHTML = coef_options.toLocaleString("fr");
document.getElementById("total-points-options").innerHTML = total_options.toLocaleString("fr");
// CALCUL
let total_points = total_CC + total_terminal + total_options;
document.getElementById("total-points").innerHTML = total_points.toLocaleString("fr");
let total_coef = 100 + coef_options;
document.getElementById("total-coef").innerHTML = total_coef.toLocaleString("fr");
let note_brute = total_points/total_coef;
let note_finale = Math.ceil(100*note_brute)/100;
document.getElementById("note-finale").innerHTML = note_finale.toLocaleString("fr");
let decision;
let sup_mention_actuelle;
if (note_finale < 8) {
decision = "Ajourné"
sup_mention_actuelle = 7.99*total_coef
} else if (note_finale < 10) {
decision = "Passe le second groupe";
sup_mention_actuelle = 9.99*total_coef
} else if (note_finale < 12) {
decision = "Admis";
sup_mention_actuelle = 11.99*total_coef
} else if (note_finale < 14) {
decision = "Admis Mention Assez Bien";
sup_mention_actuelle = 13.99*total_coef
} else if (note_finale < 16) {
decision = "Admis Mention Bien";
sup_mention_actuelle = 15.99*total_coef
} else if (note_finale < 18) {
decision = "Admis Mention Très Bien";
sup_mention_actuelle = 17.99*total_coef
} else {
decision = "Admis Mention Très Bien avec les félicitations du jury";
sup_mention_actuelle = NaN
}
if (note_finale < 18) {
let points_mention_suivante = Math.ceil(10*(sup_mention_actuelle - total_points + .01))/10
document.getElementById("points-manquants").innerHTML = points_mention_suivante.toLocaleString("fr");
} else {
document.getElementById("points-manquants").innerHTML = "-";
}
document.getElementById("decision-jury").innerHTML = decision;
}

View File

@ -12,7 +12,8 @@
<meta name="og:description" property="Calculez votre mention au Bac technologique en fonction de vos notes, ou déterminez le nombre de points qu'il vous manque pour en obtenir une en utilisant le simulateur du BCT de WikiBac."> <meta name="og:description" property="Calculez votre mention au Bac technologique en fonction de vos notes, ou déterminez le nombre de points qu'il vous manque pour en obtenir une en utilisant le simulateur du BCT de WikiBac.">
<meta property="og:image" content="https://simulation.wikibac.fr/res/logo.png"> <meta property="og:image" content="https://simulation.wikibac.fr/res/logo.png">
<link href="../res/style.css" rel="stylesheet" type="text/css"> <link href="../res/style.css" rel="stylesheet" type="text/css">
<script src="calcul.js"></script> <script src="../res/calcul.js"></script>
<script src="update.js"></script>
</head> </head>
<body onload="update()"> <body onload="update()">
<header> <header>
@ -55,359 +56,152 @@
<a href="https://www.legifrance.gouv.fr/codes/section_lc/LEGITEXT000006071191/LEGISCTA000006151441?anchor=LEGIARTI000039308585" target="_blank">En savoir plus</a> <a href="https://www.legifrance.gouv.fr/codes/section_lc/LEGITEXT000006071191/LEGISCTA000006151441?anchor=LEGIARTI000039308585" target="_blank">En savoir plus</a>
</div> </div>
<form onchange="update()" id="calculateur"> <form onchange="update()" id="simulateur">
<fieldset> <div class="ln head">
<legend>Contrôle continu</legend> <div>Matière</div>
<div>Coef.</div>
<p> <div>Première</div>
Pour les notes empruntées au livret scolaire (c'est-à-dire la moyenne de l'année), <div>Terminale</div>
il faut arrondir la note au dixième à l'excès&nbsp;: par exemple, pour une moyenne annuelle de 16,54, <div>Points</div>
il faut arrondir à 16,6. </div>
</p> <h2>Contrôle continu</h2>
<div class="section">
<div class="table_wrapper"> <div class="ln">
<table> <div>Enseignement moral et civique</div>
<tr> <div>2</div>
<th rowspan="2">Matière</th> <div><input type="number" min=0 max=20 step=.1 name="EMC-1re-note" id="EMC-1re-note"
<th colspan="3">Première</th> aria-label="Note d'enseignement moral et civique de première" required></div>
<th colspan="3">Terminale</th> <div><input type="number" min=0 max=20 step=.1 name="EMC-tle-note" id="EMC-tle-note"
</tr> aria-label="Note d'enseignement moral et civique de terminale" required></div>
<tr> <div id="EMC-points"></div>
<th>Coef.</th>
<th>Note</th>
<th>Points</th>
<th>Coef.</th>
<th>Note</th>
<th>Points</th>
</tr>
<tr>
<td>Enseignement moral et civique</td>
<td>1</td>
<td>
<label for="note-emc-1re">Note d'EMC de première</label>
<input type="number" name="note-emc-1re"
id="note-emc-1re" class="note" min="0" max="20" step=".1" required>
</td>
<td>
<span id="points-emc-1re"></span>
</td>
<td>1</td>
<td>
<label for="note-emc-tle">Note d'EMC de terminale</label>
<input type="number" name="note-emc-tle"
id="note-emc-tle" class="note" min="0" max="20" step=".1" required>
</td>
<td>
<span id="points-emc-tle"></span>
</td>
</tr>
<tr>
<td>Langue vivante A</td>
<td>3</td>
<td>
<label for="note-lva-1re">Note de LVA de première</label>
<input type="number" name="note-lva-1re"
id="note-lva-1re" class="note" min="0" max="20" step=".1" required>
</td>
<td>
<span id="points-lva-1re"></span>
</td>
<td>3</td>
<td>
<label for="note-lva-tle">Note de LVA de terminale</label>
<input type="number" name="note-lva-tle"
id="note-lva-tle" class="note" min="0" max="20" step=".1" required>
</td>
<td>
<span id="points-lva-tle"></span>
</td>
</tr>
<tr>
<td>Langue vivante B</td>
<td>3</td>
<td>
<label for="note-lvb-1re">Note de LVB de première</label>
<input type="number" name="note-lvb-1re"
id="note-lvb-1re" class="note" min="0" max="20" step=".1" required>
</td>
<td>
<span id="points-lvb-1re"></span>
</td>
<td>3</td>
<td>
<label for="note-lvb-tle">Note de LVB de terminale</label>
<input type="number" name="note-lvb-tle"
id="note-lvb-tle" class="note" min="0" max="20" step=".1" required>
</td>
<td>
<span id="points-lvb-tle"></span>
</td>
</tr>
<tr>
<td>Histoire-géographie</td>
<td>3</td>
<td>
<label for="note-hg-1re">Note d'histoire-géographie de première</label>
<input type="number" name="note-hg-1re"
id="note-hg-1re" class="note" min="0" max="20" step=".1" required>
</td>
<td>
<span id="points-hg-1re"></span>
</td>
<td>3</td>
<td>
<label for="note-hg-tle">Note d'histoire-géographie de terminale</label>
<input type="number" name="note-hg-tle"
id="note-hg-tle" class="note" min="0" max="20" step=".1" required>
</td>
<td>
<span id="points-hg-tle"></span>
</td>
</tr>
<tr>
<td>Mathématiques</td>
<td>3</td>
<td>
<label for="note-mat-1re">Note de mathématiques de première</label>
<input type="number" name="note-mat-1re"
id="note-mat-1re" class="note" min="0" max="20" step=".1" required>
</td>
<td>
<span id="points-mat-1re"></span>
</td>
<td>3</td>
<td>
<label for="note-mat-tle">Note de mathématiques de terminale</label>
<input type="number" name="note-mat-1re"
id="note-mat-tle" class="note" min="0" max="20" step=".1" required>
</td>
<td>
<span id="points-mat-tle"></span>
</td>
</tr>
<tr>
<td>Éducation physique et sportive</td>
<td colspan="3" class="null"></td>
<td>6</td>
<td>
<label for="note-eps-tle">Note d'EPS</label>
<input type="number" name="note-eps-tle"
id="note-eps-tle" class="note" min="0" max="20" step="1" required>
</td>
<td>
<span id="points-eps-tle"></span>
</td>
</tr>
<tr>
<td>Spécialité 3 abandonnée</td>
<td>8</td>
<td>
<label for="note-spe3-1re">Note de spécialité abandonnée en classe de première</label>
<input type="number" name="note-spe3-1re"
id="note-spe3-1re" class="note" min="0" max="20" step=".1" required>
</td>
<td>
<span id="points-spe3-1re"></span>
</td>
<td colspan="3" class="null"></td>
</tr>
<tr class="total">
<td>Totaux</td>
<td colspan="3">Total des coefficients&nbsp;: 40</td>
<td colspan="3">Total des points&nbsp;: <span id="total-points-CC">0</span></td>
</tr>
</table>
</div> </div>
</fieldset> <div class="ln">
<fieldset> <div>Langue vivante A</div>
<legend>Épreuves terminales</legend> <div>6</div>
<div><input type="number" min=0 max=20 step=.1 name="LVA-1re-note" id="LVA-1re-note"
<p>Remarque&nbsp;: Seules ces épreuves peuvent faire l'objet d'un éventuel rattrapage (sauf épreuve orale terminale).</p> aria-label="Note de langue vivante A de première" required></div>
<div><input type="number" min=0 max=20 step=.1 name="LVA-tle-note" id="LVA-tle-note"
<div class="table_wrapper"> aria-label="Note de langue vivante A de terminale" required></div>
<table> <div id="LVA-points"></div>
<tr>
<th rowspan="2">Matière</th>
<th rowspan="2">Coef.</th>
<th colspan="2">1<sup>er</sup> groupe</th>
</tr>
<tr>
<th>Note</th>
<th>Points</th>
</tr>
<tr>
<td>Français écrit</td>
<td>5</td>
<td>
<label for="note-fr-ecrit">Note de français oral</label>
<input type="number" name="note-fr-ecrit"
id="note-fr-ecrit" class="note" min="0" max="20" step="1" required>
</td>
<td>
<span id="points-fr-ecrit"></span>
</td>
</tr>
<tr>
<td>Français oral</td>
<td>5</td>
<td>
<label for="note-fr-oral">Note de français oral</label>
<input type="number" name="note-fr-oral"
id="note-fr-oral" class="note" min="0" max="20" step="1" required>
</td>
<td>
<span id="points-fr-oral"></span>
</td>
</tr>
<tr>
<td>Philosophie</td>
<td>4</td>
<td>
<label for="note-philo">Note de philosophie</label>
<input type="number" name="note-philo"
id="note-philo" class="note" min="0" max="20" step="1" required>
</td>
<td>
<span id="points-philo"></span>
</td>
</tr>
<tr>
<td>Épreuve orale terminale (Grand oral)</td>
<td>14</td>
<td>
<label for="note-go">Note du Grand Oral</label>
<input type="number" name="note-go"
id="note-go" class="note" min="0" max="20" step="1" required>
</td>
<td>
<span id="points-go"></span>
</td>
</tr>
<tr>
<td>Spécialité 1</td>
<td>16</td>
<td>
<label for="note-spe1">Note de français oral</label>
<input type="number" name="note-spe1"
id="note-spe1" class="note" min="0" max="20" step="1" required>
</td>
<td>
<span id="points-spe1"></span>
</td>
</tr>
<tr>
<td>Spécialité 2</td>
<td>16</td>
<td>
<label for="note-spe2">Note de français oral</label>
<input type="number" name="note-spe2"
id="note-spe2" class="note" min="0" max="20" step="1" required>
</td>
<td>
<span id="points-spe2"></span>
</td>
</tr>
<tr class="total">
<td>Totaux</td>
<td>60</td>
<td></td>
<td><span id="total-points-terminal"></span></td>
</tr>
</table>
</div> </div>
</fieldset> <div class="ln">
<fieldset> <div>Langue vivante B</div>
<legend>Option(s)</legend> <div>6</div>
<div><input type="number" min=0 max=20 step=.1 name="LVB-1re-note" id="LVB-1re-note"
<p> aria-label="Note de langue vivante B de première" required></div>
Pour les notes empruntées au livret scolaire (c'est-à-dire la moyenne de l'année), <div><input type="number" min=0 max=20 step=.1 name="LVB-tle-note" id="LVB-tle-note"
il faut arrondir la note au dixième à l'excès&nbsp;: par exemple, pour une moyenne annuelle de 16,54, aria-label="Note de langue vivante B de terminale" required></div>
il faut arrondir à 16,6. <div id="LVB-points"></div>
</p>
<div class="table_wrapper">
<table>
<tr>
<th rowspan="2">Matière</th>
<th colspan="4">Première</th>
<th colspan="4">Terminale</th>
</tr>
<tr>
<th>?</th>
<th>Coef.</th>
<th>Note</th>
<th>Points</th>
<th>?</th>
<th>Coef.</th>
<th>Note</th>
<th>Points</th>
</tr>
<tr>
<td>Option 1</td>
<td>
<label for="check-opt1-1re">Activation option 1, première</label>
<input type="checkbox" name="check-opt1-1re" id="check-opt1-1re">
</td>
<td id="coef-opt1-1re">2</td>
<td>
<label for="note-opt1-1re">Note d'option 1 - première</label>
<input type="number" name="note-opt1-1re"
id="note-opt1-1re" class="note" min="0" max="20" step=".1">
</td>
<td>
<span id="points-opt1-1re"></span>
</td>
<td>
<label for="check-opt1-tle">Activation option 1, terminale</label>
<input type="checkbox" name="check-opt1-tle" id="check-opt1-tle">
</td>
<td id="coef-opt1-tle">2</td>
<td>
<label for="note-opt1-tle">Note d'option 1 - terminale</label>
<input type="number" name="note-opt1-tle"
id="note-opt1-tle" class="note" min="0" max="20" step=".1">
</td>
<td>
<span id="points-opt1-tle"></span>
</td>
</tr>
<tr>
<td>Option 2</td>
<td>
<label for="check-opt2-1re">Activation option 2, première</label>
<input type="checkbox" name="check-opt2-1re" id="check-opt2-1re">
</td>
<td id="coef-opt2-1re">2</td>
<td>
<label for="note-opt2-1re">Note d'option 2 - première</label>
<input type="number" name="note-opt2-1re"
id="note-opt2-1re" class="note" min="0" max="20" step=".1">
</td>
<td>
<span id="points-opt2-1re"></span>
</td>
<td>
<label for="check-opt2-tle">Activation option 2, terminale</label>
<input type="checkbox" name="check-opt2-tle" id="check-opt2-tle">
</td>
<td id="coef-opt2-tle">2</td>
<td>
<label for="note-opt2-tle">Note d'option 2 - terminale</label>
<input type="number" name="note-opt2-tle"
id="note-opt2-tle" class="note" min="0" max="20" step=".1">
</td>
<td>
<span id="points-opt2-tle"></span>
</td>
</tr>
<tr class="total">
<td>Totaux</td>
<td colspan="4">Total des coefficients : <span id="total-coef-options">-</span></td>
<td colspan="4">Total des points : <span id="total-points-options">-</span></td>
</tr>
</table>
</div> </div>
</fieldset> <div class="ln">
<div>Mathématiques</div>
<div>6</div>
<div><input type="number" min=0 max=20 step=.1 name="MAT-1re-note" id="MAT-1re-note"
aria-label="Note de mathématiques de première" required></div>
<div><input type="number" min=0 max=20 step=.1 name="MAT-tle-note" id="MAT-tle-note"
aria-label="Note de mathématiques de terminale" required></div>
<div id="MAT-points"></div>
</div>
<div class="ln">
<div>Histoire-géographie</div>
<div>6</div>
<div><input type="number" min=0 max=20 step=.1 name="HG-1re-note" id="HG-1re-note"
aria-label="Note d'histoire-géographie de première" required></div>
<div><input type="number" min=0 max=20 step=.1 name="HG-tle-note" id="HG-tle-note"
aria-label="Note d'histoire-géographie de terminale" required></div>
<div id="HG-points"></div>
</div>
<div class="ln">
<div>Éducation physique et sportive</div>
<div>6</div>
<div class="null"></div>
<div><input type="number" min=0 max=20 step=1 name="EPS-note" id="EPS-note"
aria-label="Note d'éducation physique et sportive" required></div>
<div id="EPS-points"></div>
</div>
<div class="ln">
<div>Spécialité 3 abandonnée</div>
<div>8</div>
<div><input type="number" min=0 max=20 step=.1 name="SP3-note" id="SP3-note"
aria-label="Note de spécialité 3 abandonnée" required></div>
<div class="null"></div>
<div id="SP3-points"></div>
</div>
</div>
<h2>Épreuves terminales</h2>
<div class="section">
<div class="ln">
<div>Français - écrit</div>
<div>5</div>
<div><input type="number" min=0 max=20 step=1 name="FR-ecrit-note" id="FR-ecrit-note"
aria-label="Note de français écrit" required></div>
<div class="null"></div>
<div id="FR-ecrit-points"></div>
</div>
<div class="ln">
<div>Français - oral</div>
<div>5</div>
<div><input type="number" min=0 max=20 step=1 name="FR-oral-note" id="FR-oral-note"
aria-label="Note de français oral" required></div>
<div class="null"></div>
<div id="FR-oral-points"></div>
</div>
<div class="ln">
<div>Philosophie</div>
<div>4</div>
<div class="null"></div>
<div><input type="number" min=0 max=20 step=1 name="PHILO-note" id="PHILO-note"
aria-label="Note de philosophie" required></div>
<div id="PHILO-points"></div>
</div>
<div class="ln">
<div>Épreuve orale terminale (Grand oral)</div>
<div>14</div>
<div class="null"></div>
<div><input type="number" min=0 max=20 step=1 name="GO-note" id="GO-note"
aria-label="Note du grand oral" required></div>
<div id="GO-points"></div>
</div>
<div class="ln">
<div>Spécialité 1</div>
<div>16</div>
<div class="null"></div>
<div><input type="number" min=0 max=20 step=1 name="SP1-note" id="SP1-note"
aria-label="Note de spécialité 1" required></div>
<div id="SP1-points"></div>
</div>
<div class="ln">
<div>Spécialité 2</div>
<div>16</div>
<div class="null"></div>
<div><input type="number" min=0 max=20 step=1 name="SP2-note" id="SP2-note"
aria-label="Note de spécialité 2" required></div>
<div id="SP2-points"></div>
</div>
</div>
<h2>Options</h2>
<div class="section">
<div class="ln">
<div>Option 1</div>
<div>4</div>
<div><input type="number" min=0 max=20 step=.1 name="OPT1-1re-note" id="OPT1-1re-note"
aria-label="Note d'option 1 de première"></div>
<div><input type="number" min=0 max=20 step=.1 name="OPT1-tle-note" id="OPT1-tle-note"
aria-label="Note d'option 1 de terminale"></div>
<div id="OPT1-points"></div>
</div>
<div class="ln">
<div>Option 2</div>
<div>4</div>
<div><input type="number" min=0 max=20 step=.1 name="OPT2-1re-note" id="OPT2-1re-note"
aria-label="Note d'option 2 de première"></div>
<div><input type="number" min=0 max=20 step=.1 name="OPT2-tle-note" id="OPT2-tle-note"
aria-label="Note d'option 2 de terminale"></div>
<div id="OPT2-points"></div>
</div>
</div>
</form> </form>
</div> </div>
</main> </main>

30
BCT/update.js Executable file
View File

@ -0,0 +1,30 @@
function update() {
let controle_continu = calcul_section([
{ code: 'EMC', entries: ['EMC-1re', 'EMC-tle'], coef: 1 },
{ code: 'LVA', entries: ['LVA-1re', 'LVA-tle'], coef: 3 },
{ code: 'LVB', entries: ['LVB-1re', 'LVB-tle'], coef: 3 },
{ code: 'MAT', entries: ['MAT-1re', 'MAT-tle'], coef: 3 },
{ code: 'HG', entries: ['HG-1re', 'HG-tle'], coef: 3 },
{ code: 'EPS', entries: ['EPS'], coef: 6 },
{ code: 'SP3', entries: ['SP3'], coef: 8 },
]);
let epreuves_terminales = calcul_section([
{ code: 'FR-ecrit', entries: ["FR-ecrit"], coef: 5 },
{ code: 'FR-oral', entries: ["FR-oral"], coef: 5 },
{ code: 'PHILO', entries: ["PHILO"], coef: 4 },
{ code: 'GO', entries: ["GO"], coef: 14 },
{ code: 'SP1', entries: ["SP1"], coef: 16 },
{ code: 'SP2', entries: ["SP2"], coef: 16 },
]);
let options = calcul_section([
{ code: 'OPT1', entries: ["OPT1-1re", "OPT1-tle"], coef: 2 },
{ code: 'OPT2', entries: ["OPT2-1re", "OPT2-tle"], coef: 2 },
])
let points = controle_continu.points + epreuves_terminales.points + options.points;
let coefficients = controle_continu.coefficients + epreuves_terminales.coefficients + options.coefficients;
decider(points, coefficients);
}

View File

@ -1,243 +0,0 @@
function update() {
/* ------------- Contrôle continu ------------- */
let total_CC = 0;
// EMC
let note_emc_1re = document.getElementById("note-emc-1re").value;
let points_emc_1re = 1 * note_emc_1re
document.getElementById("points-emc-1re").innerHTML = points_emc_1re.toLocaleString("fr");
total_CC += points_emc_1re;
let note_emc_tle = document.getElementById("note-emc-tle").value;
let points_emc_tle = 1 * note_emc_tle
document.getElementById("points-emc-tle").innerHTML = points_emc_tle.toLocaleString("fr");
total_CC += points_emc_tle;
// LVB
let note_lvb_1re = document.getElementById("note-lvb-1re").value;
let points_lvb_1re = 3 * note_lvb_1re
document.getElementById("points-lvb-1re").innerHTML = points_lvb_1re.toLocaleString("fr");
total_CC += points_lvb_1re;
let note_lvb_tle = document.getElementById("note-lvb-tle").value;
let points_lvb_tle = 3 * note_lvb_tle
document.getElementById("points-lvb-tle").innerHTML = points_lvb_tle.toLocaleString("fr");
total_CC += points_lvb_tle;
// ES
let note_es_1re = document.getElementById("note-es-1re").value;
let points_es_1re = 3 * note_es_1re
document.getElementById("points-es-1re").innerHTML = points_es_1re.toLocaleString("fr");
total_CC += points_es_1re;
let note_es_tle = document.getElementById("note-es-tle").value;
let points_es_tle = 3 * note_es_tle
document.getElementById("points-es-tle").innerHTML = points_es_tle.toLocaleString("fr");
total_CC += points_es_tle;
// EPS
let note_eps_tle = document.getElementById("note-eps-tle").value;
let points_eps_tle = 6 * note_eps_tle
document.getElementById("points-eps-tle").innerHTML = points_eps_tle.toLocaleString("fr");
total_CC += points_eps_tle;
// Spé 3
let note_spe3_1re = document.getElementById("note-spe3-1re").value;
let points_spe3_1re = 8 * note_spe3_1re
document.getElementById("points-spe3-1re").innerHTML = points_spe3_1re.toLocaleString("fr");
total_CC += points_spe3_1re;
document.getElementById("total-points-CC").innerHTML = total_CC.toLocaleString("fr")
/* ------------- Épreuves terminales ------------- */
let total_terminal = 0;
// Français écrit
let note_fr_ecrit = document.getElementById("note-fr-ecrit").value;
let points_fr_ecrit = 5 * note_fr_ecrit
document.getElementById("points-fr-ecrit").innerHTML = points_fr_ecrit.toLocaleString("fr");
total_terminal += points_fr_ecrit;
// Français oral
let note_fr_oral = document.getElementById("note-fr-oral").value;
let points_fr_oral = 5 * note_fr_oral
document.getElementById("points-fr-oral").innerHTML = points_fr_oral.toLocaleString("fr");
total_terminal += points_fr_oral;
// Philosophie
let note_philo = document.getElementById("note-philo").value;
let points_philo = 8 * note_philo
document.getElementById("points-philo").innerHTML = points_philo.toLocaleString("fr");
total_terminal += points_philo;
// Grand oral
let note_go = document.getElementById("note-go").value;
let points_go = 10 * note_go
document.getElementById("points-go").innerHTML = points_go.toLocaleString("fr");
total_terminal += points_go;
// Spé 1
let note_spe1 = document.getElementById("note-spe1").value;
let points_spe1 = 16 * note_spe1
document.getElementById("points-spe1").innerHTML = points_spe1.toLocaleString("fr");
total_terminal += points_spe1;
// Spé 2
let note_spe2 = document.getElementById("note-spe2").value;
let points_spe2 = 16 * note_spe2
document.getElementById("points-spe2").innerHTML = points_spe2.toLocaleString("fr");
total_terminal += points_spe2;
document.getElementById("total-points-terminal").innerHTML = total_terminal.toLocaleString("fr")
/* ------------- Épreuves spécifiques ------------- */
let total_specifique = 0;
// ACL écrit
let note_acl_ecrit = document.getElementById("note-acl-ecrit").value;
let points_acl_ecrit = 10 * note_acl_ecrit
document.getElementById("points-acl-ecrit").innerHTML = points_acl_ecrit.toLocaleString("fr");
total_specifique += points_acl_ecrit;
// ACL oral
let note_acl_oral = document.getElementById("note-acl-oral").value;
let points_acl_oral = 10 * note_acl_oral
document.getElementById("points-acl-oral").innerHTML = points_acl_oral.toLocaleString("fr");
total_specifique += points_acl_oral;
// HG écrit
let note_hg_ecrit = document.getElementById("note-hg-ecrit").value;
let points_hg_ecrit = 10 * note_hg_ecrit
document.getElementById("points-hg-ecrit").innerHTML = points_hg_ecrit.toLocaleString("fr");
total_specifique += points_hg_ecrit;
// HG oral
let note_hg_oral = document.getElementById("note-hg-oral").value;
let points_hg_oral = 10 * note_hg_oral
document.getElementById("points-hg-oral").innerHTML = points_hg_oral.toLocaleString("fr");
total_specifique += points_hg_oral;
// CDM
let note_cdm = document.getElementById("note-cdm").value;
let points_cdm = 20 * note_cdm
document.getElementById("points-cdm").innerHTML = points_cdm.toLocaleString("fr");
total_specifique += points_cdm;
document.getElementById("total-points-specifique").innerHTML = total_specifique.toLocaleString("fr")
/* ------------- Options ------------- */
let total_options = 0;
let coef_options = 0;
if (document.getElementById("check-lca-1re").checked) {
document.getElementById("coef-lca-1re").innerHTML = "2";
coef_options += 2;
let points_lca_1re = 2*document.getElementById("note-lca-1re").value;
total_options += points_lca_1re;
document.getElementById("points-lca-1re").innerHTML = points_lca_1re.toLocaleString("fr");
} else {
document.getElementById("coef-lca-1re").innerHTML = "<del>2</del>";
document.getElementById("points-lca-1re").innerHTML = "0";
}
if (document.getElementById("check-lca-tle").checked) {
document.getElementById("coef-lca-tle").innerHTML = "2";
coef_options += 2;
let points_lca_tle = 2*document.getElementById("note-lca-tle").value;
total_options += points_lca_tle;
document.getElementById("points-lca-tle").innerHTML = points_lca_tle.toLocaleString("fr");
} else {
document.getElementById("coef-lca-tle").innerHTML = "<del>2</del>";
document.getElementById("points-lca-tle").innerHTML = "0";
}
if (document.getElementById("check-opt1-1re").checked) {
document.getElementById("coef-opt1-1re").innerHTML = "2";
coef_options += 2;
let points_opt1_1re = 2*document.getElementById("note-opt1-1re").value;
total_options += points_opt1_1re;
document.getElementById("points-opt1-1re").innerHTML = points_opt1_1re.toLocaleString("fr");
} else {
document.getElementById("coef-opt1-1re").innerHTML = "<del>2</del>";
document.getElementById("points-opt1-1re").innerHTML = "0";
}
if (document.getElementById("check-opt1-tle").checked) {
document.getElementById("coef-opt1-tle").innerHTML = "2";
coef_options += 2;
let points_opt1_tle = 2*document.getElementById("note-opt1-tle").value;
total_options += points_opt1_tle;
document.getElementById("points-opt1-tle").innerHTML = points_opt1_tle.toLocaleString("fr");
} else {
document.getElementById("coef-opt1-tle").innerHTML = "<del>2</del>";
document.getElementById("points-opt1-tle").innerHTML = "0";
}
if (document.getElementById("check-opt2").checked) {
document.getElementById("coef-opt2").innerHTML = "2";
coef_options += 2;
let points_opt2 = 2*document.getElementById("note-opt2").value;
total_options += points_opt2;
document.getElementById("points-opt2").innerHTML = points_opt2.toLocaleString("fr");
} else {
document.getElementById("coef-opt2").innerHTML = "<del>2</del>";
document.getElementById("points-opt2").innerHTML = "0";
}
document.getElementById("total-coef-options").innerHTML = coef_options.toLocaleString("fr");
document.getElementById("total-points-options").innerHTML = total_options.toLocaleString("fr");
// CALCUL
let total_points = total_CC + total_terminal + total_specifique + total_options;
document.getElementById("total-points").innerHTML = total_points.toLocaleString("fr");
let total_coef = 148 + coef_options;
document.getElementById("total-coef").innerHTML = total_coef.toLocaleString("fr");
let note_brute = total_points/total_coef;
let note_finale = Math.ceil(100*note_brute)/100;
document.getElementById("note-finale").innerHTML = note_finale.toLocaleString("fr");
let decision;
let sup_mention_actuelle;
if (note_finale < 8) {
decision = "Ajourné"
sup_mention_actuelle = 7.99*total_coef
} else if (note_finale < 10) {
decision = "Passe le second groupe";
sup_mention_actuelle = 9.99*total_coef
} else if (note_finale < 12) {
decision = "Admis";
sup_mention_actuelle = 11.99*total_coef
} else if (note_finale < 14) {
decision = "Admis Mention Assez Bien";
sup_mention_actuelle = 13.99*total_coef
} else if (note_finale < 16) {
decision = "Admis Mention Bien";
sup_mention_actuelle = 15.99*total_coef
} else if (note_finale < 18) {
decision = "Admis Mention Très Bien";
sup_mention_actuelle = 17.99*total_coef
} else {
decision = "Admis Mention Très Bien avec les félicitations du jury";
sup_mention_actuelle = NaN
}
if (note_finale < 18) {
let points_mention_suivante = Math.ceil(10*(sup_mention_actuelle - total_points + .01))/10
document.getElementById("points-manquants").innerHTML = points_mention_suivante.toLocaleString("fr");
} else {
document.getElementById("points-manquants").innerHTML = "-";
}
document.getElementById("decision-jury").innerHTML = decision;
}

View File

@ -12,7 +12,8 @@
<meta name="og:description" property="Calculez votre mention au Bac Français International (BFI) en fonction de vos notes, ou déterminez le nombre de points qu'il vous manque pour en obtenir une en utilisant le simulateur du BFI de WikiBac."> <meta name="og:description" property="Calculez votre mention au Bac Français International (BFI) en fonction de vos notes, ou déterminez le nombre de points qu'il vous manque pour en obtenir une en utilisant le simulateur du BFI de WikiBac.">
<meta property="og:image" content="https://simulation.wikibac.fr/res/logo.png"> <meta property="og:image" content="https://simulation.wikibac.fr/res/logo.png">
<link href="../res/style.css" rel="stylesheet" type="text/css"> <link href="../res/style.css" rel="stylesheet" type="text/css">
<script src="calcul.js"></script> <script src="../res/calcul.js"></script>
<script src="update.js"></script>
</head> </head>
<body onload="update()"> <body onload="update()">
<header> <header>
@ -55,416 +56,194 @@
<a href="https://www.legifrance.gouv.fr/codes/section_lc/LEGITEXT000006071191/LEGISCTA000006151440?anchor=LEGIARTI000039308580" target="_blank">En savoir plus</a> <a href="https://www.legifrance.gouv.fr/codes/section_lc/LEGITEXT000006071191/LEGISCTA000006151440?anchor=LEGIARTI000039308580" target="_blank">En savoir plus</a>
</div> </div>
<form onchange="update()" id="calculateur"> <form onchange="update()" id="simulateur">
<fieldset> <div class="ln head">
<legend>Contrôle continu</legend> <div>Matière</div>
<div>Coef.</div>
<p> <div>Première</div>
Pour les notes empruntées au livret scolaire (c'est-à-dire la moyenne de l'année), <div>Terminale</div>
il faut arrondir la note au dixième à l'excès&nbsp;: par exemple, pour une moyenne annuelle de 16,54, <div>Points</div>
il faut arrondir à 16,6. </div>
</p> <h2>Contrôle continu</h2>
<div class="section">
<div class="table_wrapper"> <div class="ln">
<table> <div>Enseignement moral et civique</div>
<tr> <div>2</div>
<th rowspan="2">Matière</th> <div><input type="number" min=0 max=20 step=.1 name="EMC-1re-note" id="EMC-1re-note"
<th colspan="3">Première</th> aria-label="Note d'enseignement moral et civique de première" required></div>
<th colspan="3">Terminale</th> <div><input type="number" min=0 max=20 step=.1 name="EMC-tle-note" id="EMC-tle-note"
</tr> aria-label="Note d'enseignement moral et civique de terminale" required></div>
<tr> <div id="EMC-points"></div>
<th>Coef.</th>
<th>Note</th>
<th>Points</th>
<th>Coef.</th>
<th>Note</th>
<th>Points</th>
</tr>
<tr>
<td>Enseignement moral et civique</td>
<td>1</td>
<td>
<label for="note-emc-1re">Note d'EMC de première</label>
<input type="number" name="note-emc-1re"
id="note-emc-1re" class="note" min="0" max="20" step=".1" required>
</td>
<td>
<span id="points-emc-1re"></span>
</td>
<td>1</td>
<td>
<label for="note-emc-tle">Note d'EMC de terminale</label>
<input type="number" name="note-emc-tle"
id="note-emc-tle" class="note" min="0" max="20" step=".1" required>
</td>
<td>
<span id="points-emc-tle"></span>
</td>
</tr>
<tr>
<td>Langue vivante B</td>
<td>3</td>
<td>
<label for="note-lvb-1re">Note de LVB de première</label>
<input type="number" name="note-lvb-1re"
id="note-lvb-1re" class="note" min="0" max="20" step=".1" required>
</td>
<td>
<span id="points-lvb-1re"></span>
</td>
<td>3</td>
<td>
<label for="note-lvb-tle">Note de LVB de terminale</label>
<input type="number" name="note-lvb-tle"
id="note-lvb-tle" class="note" min="0" max="20" step=".1" required>
</td>
<td>
<span id="points-lvb-tle"></span>
</td>
</tr>
<tr>
<td>Enseignement scientifique</td>
<td>3</td>
<td>
<label for="note-es-1re">Note d'enseignement scientifique de première</label>
<input type="number" name="note-es-1re"
id="note-es-1re" class="note" min="0" max="20" step=".1" required>
</td>
<td>
<span id="points-es-1re"></span>
</td>
<td>3</td>
<td>
<label for="note-es-tle">Note d'enseignement scientifique de terminale</label>
<input type="number" name="note-es-1re"
id="note-es-tle" class="note" min="0" max="20" step=".1" required>
</td>
<td>
<span id="points-es-tle"></span>
</td>
</tr>
<tr>
<td>Éducation physique et sportive</td>
<td colspan="3" class="null"></td>
<td>6</td>
<td>
<label for="note-eps-tle">Note d'EPS</label>
<input type="number" name="note-eps-tle"
id="note-eps-tle" class="note" min="0" max="20" step="1" required>
</td>
<td>
<span id="points-eps-tle"></span>
</td>
</tr>
<tr>
<td>Spécialité 3 abandonnée</td>
<td>8</td>
<td>
<label for="note-spe3-1re">Note de spécialité abandonnée en classe de première</label>
<input type="number" name="note-spe3-1re"
id="note-spe3-1re" class="note" min="0" max="20" step=".1" required>
</td>
<td>
<span id="points-spe3-1re"></span>
</td>
<td colspan="3" class="null"></td>
</tr>
<tr class="total">
<td>Totaux</td>
<td colspan="3">Total des coefficients&nbsp;: 28</td>
<td colspan="3">Total des points&nbsp;: <span id="total-points-CC">0</span></td>
</tr>
</table>
</div> </div>
</fieldset> <div class="ln">
<fieldset> <div>Langue vivante B</div>
<legend>Épreuves terminales</legend> <div>6</div>
<div><input type="number" min=0 max=20 step=.1 name="LVB-1re-note" id="LVB-1re-note"
<p>Remarque&nbsp;: Seules ces épreuves peuvent faire l'objet d'un éventuel rattrapage (sauf épreuve orale terminale).</p> aria-label="Note de langue vivante B de première" required></div>
<div><input type="number" min=0 max=20 step=.1 name="LVB-tle-note" id="LVB-tle-note"
<div class="table_wrapper"> aria-label="Note de langue vivante B de terminale" required></div>
<table> <div id="LVB-points"></div>
<tr>
<th rowspan="2">Matière</th>
<th rowspan="2">Coef.</th>
<th colspan="2">1<sup>er</sup> groupe</th>
</tr>
<tr>
<th>Note</th>
<th>Points</th>
</tr>
<tr>
<td>Français écrit</td>
<td>5</td>
<td>
<label for="note-fr-ecrit">Note de français oral</label>
<input type="number" name="note-fr-ecrit"
id="note-fr-ecrit" class="note" min="0" max="20" step="1" required>
</td>
<td>
<span id="points-fr-ecrit"></span>
</td>
</tr>
<tr>
<td>Français oral</td>
<td>5</td>
<td>
<label for="note-fr-oral">Note de français oral</label>
<input type="number" name="note-fr-oral"
id="note-fr-oral" class="note" min="0" max="20" step="1" required>
</td>
<td>
<span id="points-fr-oral"></span>
</td>
</tr>
<tr>
<td>Philosophie</td>
<td>8</td>
<td>
<label for="note-philo">Note de philosophie</label>
<input type="number" name="note-philo"
id="note-philo" class="note" min="0" max="20" step="1" required>
</td>
<td>
<span id="points-philo"></span>
</td>
</tr>
<tr>
<td>Épreuve orale terminale (Grand oral)</td>
<td>10</td>
<td>
<label for="note-go">Note du Grand Oral</label>
<input type="number" name="note-go"
id="note-go" class="note" min="0" max="20" step="1" required>
</td>
<td>
<span id="points-go"></span>
</td>
</tr>
<tr>
<td>Spécialité 1</td>
<td>16</td>
<td>
<label for="note-spe1">Note de français oral</label>
<input type="number" name="note-spe1"
id="note-spe1" class="note" min="0" max="20" step="1" required>
</td>
<td>
<span id="points-spe1"></span>
</td>
</tr>
<tr>
<td>Spécialité 2</td>
<td>16</td>
<td>
<label for="note-spe2">Note de français oral</label>
<input type="number" name="note-spe2"
id="note-spe2" class="note" min="0" max="20" step="1" required>
</td>
<td>
<span id="points-spe2"></span>
</td>
</tr>
<tr class="total">
<td>Totaux</td>
<td>60</td>
<td></td>
<td><span id="total-points-terminal"></span></td>
</tr>
</table>
</div> </div>
</fieldset> <div class="ln">
<fieldset> <div>Enseignement scientifique</div>
<legend>Épreuves spécifiques du BFI</legend> <div>6</div>
<div class="table_wrapper"> <div><input type="number" min=0 max=20 step=.1 name="ES-1re-note" id="ES-1re-note"
<table> aria-label="Note d'enseignement scientifique de première" required></div>
<tr> <div><input type="number" min=0 max=20 step=.1 name="ES-tle-note" id="ES-tle-note"
<th rowspan="2">Matière</th> aria-label="Note d'enseignement scientifique de terminale" required></div>
<th rowspan="2">Coef.</th> <div id="ES-points"></div>
<th colspan="2">Terminale</th>
</tr>
<tr>
<th>Note</th>
<th>Points</th>
</tr>
<tr>
<td>Approfondissement culturel et linguistique - écrit</td>
<td>10</td>
<td>
<label for="note-acl-ecrit">Note d'approfondissement culturel et linguistique écrit</label>
<input type="number" name="note-acl-ecrit"
id="note-acl-ecrit" class="note" min="0" max="20" step="1" required>
</td>
<td>
<span id="points-acl-ecrit"></span>
</td>
</tr>
<tr>
<td>Approfondissement culturel et linguistique - oral</td>
<td>10</td>
<td>
<label for="note-acl-oral">Note d'approfondissement culturel et linguistique oral</label>
<input type="number" name="note-acl-oral"
id="note-acl-oral" class="note" min="0" max="20" step="1" required>
</td>
<td>
<span id="points-acl-oral"></span>
</td>
</tr>
<tr>
<td>Histoire-géographie en langue de section - écrit</td>
<td>10</td>
<td>
<label for="note-hg-ecrit">Note d'histoire-géographie en langue de section - écrit</label>
<input type="number" name="note-hg-ecrit"
id="note-hg-ecrit" class="note" min="0" max="20" step="1" required>
</td>
<td>
<span id="points-hg-ecrit"></span>
</td>
</tr>
<tr>
<td>Histoire-géographie en langue de section - oral</td>
<td>10</td>
<td>
<label for="note-hg-oral">Note d'histoire-géographie en langue de section - oral</label>
<input type="number" name="note-hg-oral"
id="note-hg-oral" class="note" min="0" max="20" step="1" required>
</td>
<td>
<span id="points-hg-oral"></span>
</td>
</tr>
<tr>
<td>Connaissance du monde</td>
<td>20</td>
<td>
<label for="note-cdm">Note de connaissance du monde</label>
<input type="number" name="note-cdm"
id="note-cdm" class="note" min="0" max="20" step="1" required>
</td>
<td>
<span id="points-cdm"></span>
</td>
</tr>
<tr class="total">
<td>Totaux</td>
<td>60</td>
<td></td>
<td><span id="total-points-specifique"></span></td>
</tr>
</table>
</div> </div>
</fieldset> <div class="ln">
<fieldset> <div>Éducation physique et sportive</div>
<legend>Option(s)</legend> <div>6</div>
<div class="null"></div>
<p> <div><input type="number" min=0 max=20 step=1 name="EPS-note" id="EPS-note"
Pour les notes empruntées au livret scolaire (c'est-à-dire la moyenne de l'année), aria-label="Note d'éducation physique et sportive" required></div>
il faut arrondir la note au dixième à l'excès&nbsp;: par exemple, pour une moyenne annuelle de 16,54, <div id="EPS-points"></div>
il faut arrondir à 16,6.
</p>
<div class="table_wrapper">
<table>
<tr>
<th rowspan="2">Matière</th>
<th colspan="4">Première</th>
<th colspan="4">Terminale</th>
</tr>
<tr>
<th>?</th>
<th>Coef.</th>
<th>Note</th>
<th>Points</th>
<th>?</th>
<th>Coef.</th>
<th>Note</th>
<th>Points</th>
</tr>
<tr>
<td>Langues et cultures de l'Antiquité</td>
<td>
<label for="check-lca-1re">Activation LCA, première</label>
<input type="checkbox" name="check-lca-1re" id="check-lca-1re">
</td>
<td id="coef-lca-1re">2</td>
<td>
<label for="note-lca-1re">Note de langues et cultures de l'Antiquité - première</label>
<input type="number" name="note-lca-1re"
id="note-lca-1re" class="note" min="0" max="20" step=".1">
</td>
<td>
<span id="points-lca-1re"></span>
</td>
<td>
<label for="check-lca-tle">Activation LCA, terminale</label>
<input type="checkbox" name="check-lca-tle" id="check-lca-tle">
</td>
<td id="coef-lca-tle">2</td>
<td>
<label for="note-lca-tle">Note d'option suivie au cours du cycle terminal - terminale</label>
<input type="number" name="note-lca-tle"
id="note-lca-tle" class="note" min="0" max="20" step=".1">
</td>
<td>
<span id="points-lca-tle"></span>
</td>
</tr>
<tr>
<td>Option suivie au cours du cycle terminal (ex: Arts/LV3)</td>
<td>
<label for="check-opt1-1re">Activation option 1, première</label>
<input type="checkbox" name="check-opt1-1re" id="check-opt1-1re">
</td>
<td id="coef-opt1-1re">2</td>
<td>
<label for="note-opt1-1re">Note d'option suivie au cours du cycle terminal - première</label>
<input type="number" name="note-opt1-1re"
id="note-opt1-1re" class="note" min="0" max="20" step=".1">
</td>
<td>
<span id="points-opt1-1re"></span>
</td>
<td>
<label for="check-opt1-tle">Activation option 1, terminale</label>
<input type="checkbox" name="check-opt1-tle" id="check-opt1-tle">
</td>
<td id="coef-opt1-tle">2</td>
<td>
<label for="note-opt1-tle">Note d'option suivie au cours du cycle terminal - terminale</label>
<input type="number" name="note-opt1-tle"
id="note-opt1-tle" class="note" min="0" max="20" step=".1">
</td>
<td>
<span id="points-opt1-tle"></span>
</td>
</tr>
<tr>
<td>Option suivie uniquement en classe de Terminale (ex: Maths/DGEMC)</td>
<td colspan="4" class="null"></td>
<td>
<label for="check-opt2">Activation option 2</label>
<input type="checkbox" name="check-opt2" id="check-opt2">
</td>
<td id="coef-opt2">2</td>
<td>
<label for="note-opt2">Note d'option suivie uniquement en classe de Terminale</label>
<input type="number" name="note-opt2"
id="note-opt2" class="note" min="0" max="20" step=".1">
</td>
<td>
<span id="points-opt2"></span>
</td>
</tr>
<tr class="total">
<td>Totaux</td>
<td colspan="4">Total des coefficients : <span id="total-coef-options">-</span></td>
<td colspan="4">Total des points : <span id="total-points-options">-</span></td>
</tr>
</table>
</div> </div>
</fieldset> <div class="ln">
<div>Spécialité 3 abandonnée</div>
<div>8</div>
<div><input type="number" min=0 max=20 step=.1 name="SP3-note" id="SP3-note"
aria-label="Note de spécialité 3 abandonnée" required></div>
<div class="null"></div>
<div id="SP3-points"></div>
</div>
</div>
<h2>Épreuves terminales</h2>
<div class="section">
<div class="ln">
<div>Français - écrit</div>
<div>5</div>
<div><input type="number" min=0 max=20 step=1 name="FR-ecrit-note" id="FR-ecrit-note"
aria-label="Note de français écrit" required></div>
<div class="null"></div>
<div id="FR-ecrit-points"></div>
</div>
<div class="ln">
<div>Français - oral</div>
<div>5</div>
<div><input type="number" min=0 max=20 step=1 name="FR-oral-note" id="FR-oral-note"
aria-label="Note de français oral" required></div>
<div class="null"></div>
<div id="FR-oral-points"></div>
</div>
<div class="ln">
<div>Philosophie</div>
<div>8</div>
<div class="null"></div>
<div><input type="number" min=0 max=20 step=1 name="PHILO-note" id="PHILO-note"
aria-label="Note de philosophie" required></div>
<div id="PHILO-points"></div>
</div>
<div class="ln">
<div>Épreuve orale terminale (Grand oral)</div>
<div>10</div>
<div class="null"></div>
<div><input type="number" min=0 max=20 step=1 name="GO-note" id="GO-note"
aria-label="Note du grand oral" required></div>
<div id="GO-points"></div>
</div>
<div class="ln">
<div>Spécialité 1</div>
<div>16</div>
<div class="null"></div>
<div><input type="number" min=0 max=20 step=1 name="SP1-note" id="SP1-note"
aria-label="Note de spécialité 1" required></div>
<div id="SP1-points"></div>
</div>
<div class="ln">
<div>Spécialité 2</div>
<div>16</div>
<div class="null"></div>
<div><input type="number" min=0 max=20 step=1 name="SP2-note" id="SP2-note"
aria-label="Note de spécialité 2" required></div>
<div id="SP2-points"></div>
</div>
</div>
<h2>Évaluations spécifiques</h2>
<div class="section">
<div class="ln">
<div>Approfondissement culturel et linguistique - écrit</div>
<div>10</div>
<div class="null"></div>
<div><input type="number" min=0 max=20 step=1 name="ACL-ecrit-note" id="ACL-ecrit-note"
aria-label="Note d'approfondissement culturel et linguistique écrit" required></div>
<div id="ACL-ecrit-points"></div>
</div>
<div class="ln">
<div>Approfondissement culturel et linguistique - oral</div>
<div>10</div>
<div class="null"></div>
<div><input type="number" min=0 max=20 step=1 name="ACL-oral-note" id="ACL-oral-note"
aria-label="Note d'approfondissement culturel et linguistique oral" required></div>
<div id="ACL-oral-points"></div>
</div>
<div class="ln">
<div>Connaissance du monde</div>
<div>20</div>
<div class="null"></div>
<div><input type="number" min=0 max=20 step=1 name="CDM-note" id="CDM-note"
aria-label="Note de connaissance du monde" required></div>
<div id="CDM-points"></div>
</div>
<div class="ln">
<div>DNL1 obligatoire - écrit</div>
<div>10</div>
<div class="null"></div>
<div><input type="number" min=0 max=20 step=1 name="DNL1-ecrit-note" id="DNL1-ecrit-note"
aria-label="Note de DNL1 écrite" required></div>
<div id="DNL1-ecrit-points"></div>
</div>
<div class="ln">
<div>DNL1 obligatoire - oral</div>
<div>10</div>
<div class="null"></div>
<div><input type="number" min=0 max=20 step=1 name="DNL1-oral-note" id="DNL1-oral-note"
aria-label="Note de DNL1 oral" required></div>
<div id="DNL1-oral-points"></div>
</div>
</div>
<h2>Options</h2>
<div class="section">
<div class="ln">
<div>Langues et cultures de l'Antiquité</div>
<div>4</div>
<div><input type="number" min=0 max=20 step=.1 name="LCA-1re-note" id="LCA-1re-note"
aria-label="Note de langues et cultures de l'Antiquité de première"></div>
<div><input type="number" min=0 max=20 step=.1 name="LCA-tle-note" id="LCA-tle-note"
aria-label="Note de langues et cultures de l'Antiquité de terminale"></div>
<div id="LCA-points"></div>
</div>
<div class="ln">
<div>Option suivie au cours du cycle terminal</div>
<div>4</div>
<div><input type="number" min=0 max=20 step=.1 name="OPT1-1re-note" id="OPT1-1re-note"
aria-label="Note d'option suivie au cours du cycle terminal de première"></div>
<div><input type="number" min=0 max=20 step=.1 name="OPT1-tle-note" id="OPT1-tle-note"
aria-label="Note d'option suivie au cours du cycle terminal de terminale"></div>
<div id="OPT1-points"></div>
</div>
<div class="ln">
<div>Option suivie uniquement en classe de terminale</div>
<div>2</div>
<div class="null"></div>
<div><input type="number" min=0 max=20 step=.1 name="OPT2-note" id="OPT2-note"
aria-label="Note d'option suivie en classe de terminale"></div>
<div id="OPT2-points"></div>
</div>
<div class="ln">
<div>DNL2 facultative</div>
<div>20</div>
<div class="null"></div>
<div><input type="number" min=0 max=20 step=.1 name="DNL2-note" id="DNL2-note"
aria-label="Note de DNL2"></div>
<div id="DNL2-points"></div>
</div>
</div>
</form> </form>
</div> </div>
</main> </main>

38
BFI/update.js Executable file
View File

@ -0,0 +1,38 @@
function update() {
let controle_continu = calcul_section([
{ code: 'EMC', entries: ['EMC-1re', 'EMC-tle'], coef: 1 },
{ code: 'LVB', entries: ['LVB-1re', 'LVB-tle'], coef: 3 },
{ code: 'ES', entries: ['ES-1re', 'ES-tle'], coef: 3 },
{ code: 'EPS', entries: ['EPS'], coef: 6 },
{ code: 'SP3', entries: ['SP3'], coef: 8 },
]);
let epreuves_terminales = calcul_section([
{ code: 'FR-ecrit', entries: ["FR-ecrit"], coef: 5 },
{ code: 'FR-oral', entries: ["FR-oral"], coef: 5 },
{ code: 'PHILO', entries: ["PHILO"], coef: 8 },
{ code: 'GO', entries: ["GO"], coef: 10 },
{ code: 'SP1', entries: ["SP1"], coef: 16 },
{ code: 'SP2', entries: ["SP2"], coef: 16 },
]);
let evaluations_specifiques = calcul_section([
{ code: 'ACL-ecrit', entries: ["ACL-ecrit"], coef: 10 },
{ code: 'ACL-oral', entries: ["ACL-oral"], coef: 10 },
{ code: 'CDM', entries: ["CDM"], coef: 20 },
{ code: 'DNL1-ecrit', entries: ["DNL1-ecrit"], coef: 10 },
{ code: 'DNL1-oral', entries: ["DNL1-oral"], coef: 10 },
]);
let options = calcul_section([
{ code: 'LCA', entries: ["LCA-1re", "LCA-tle"], coef: 2 },
{ code: 'OPT1', entries: ["OPT1-1re", "OPT1-tle"], coef: 2 },
{ code: 'OPT2', entries: ["OPT2"], coef: 2 },
{ code: 'DNL2', entries: ["DNL2"], coef: 20 },
])
let points = controle_continu.points + epreuves_terminales.points + evaluations_specifiques.points + options.points;
let coefficients = controle_continu.coefficients + epreuves_terminales.coefficients + evaluations_specifiques.coefficients + options.coefficients;
decider(points, coefficients);
}

89
res/calcul.js Normal file
View File

@ -0,0 +1,89 @@
function arrondi_dixieme(nombre) {
return Math.ceil(10*nombre) / 10;
}
function arrondi_centieme(nombre) {
return Math.ceil(100*nombre) / 100;
}
function representer(nombre) {
return (isNaN(nombre)) ? '&ndash;' : nombre.toLocaleString();
}
function calcul_section(data) {
/* data est de la forme array[object] avec object de la forme
{ 'code': str,
'coef': int,
'entries': array }
Sortie : object de la forme { 'points': float, 'coefficients': int }
*/
let points= 0, coefficients= 0;
data.forEach(epreuve => {
let points_epreuve= 0;
let caduque = true;
epreuve.entries.forEach(entry => {
let field = document.getElementById(entry + "-note");
if (field.value) caduque = false;
if (field.value || field.required) {
points_epreuve += epreuve.coef * arrondi_dixieme(parseFloat((field.value) ? field.value : 0));
coefficients += epreuve.coef;
}
});
document.getElementById(epreuve.code + '-points').innerHTML = representer((caduque) ? NaN : points_epreuve);
points += points_epreuve;
})
return {"points": points, "coefficients": coefficients};
}
function decider(points, coefficients) {
let valide = document.getElementById("simulateur").checkValidity();
document.getElementById("total-points").innerHTML = representer((valide) ? points : NaN);
document.getElementById("total-coef").innerHTML = representer(coefficients);
let note_brute = (valide) ? points/coefficients : NaN;
let note_finale = arrondi_centieme(note_brute);
document.getElementById("note-finale").innerHTML = representer(note_finale);
let decision;
let sup_mention_actuelle;
if (note_finale < 8) {
decision = "Ajourné"
sup_mention_actuelle = 7.99*coefficients
} else if (note_finale < 10) {
decision = "Passe le second groupe";
sup_mention_actuelle = 9.99*coefficients
} else if (note_finale < 12) {
decision = "Admis";
sup_mention_actuelle = 11.99*coefficients
} else if (note_finale < 14) {
decision = "Admis Mention Assez Bien";
sup_mention_actuelle = 13.99*coefficients
} else if (note_finale < 16) {
decision = "Admis Mention Bien";
sup_mention_actuelle = 15.99*coefficients
} else if (note_finale < 18) {
decision = "Admis Mention Très Bien";
sup_mention_actuelle = 17.99*coefficients
} else if (note_finale >= 18) {
decision = "Admis Mention Très Bien avec les félicitations du jury";
sup_mention_actuelle = NaN
} else {
decision = "&ndash;"
}
if (note_finale < 18) {
let points_mention_suivante = arrondi_dixieme(sup_mention_actuelle - points + .01)
document.getElementById("points-manquants").innerHTML = representer(points_mention_suivante);
} else {
document.getElementById("points-manquants").innerHTML = "&ndash;";
}
document.getElementById("decision-jury").innerHTML = decision;
}

View File

@ -13,14 +13,21 @@ a:link, a:visited {
} }
h1 { h1 {
margin: 10px 0;
text-align: center; text-align: center;
} }
h1, h2, h3, h4, h5, h6 {
margin-top: 15px;
}
p { p {
margin-bottom: 1em; margin-bottom: 1em;
} }
del {
color: #888;
}
header { header {
margin: 10px; margin: 10px;
} }
@ -68,8 +75,9 @@ header {
} }
div.content { div.content {
width: clamp(400px, 70%, 1200px); width: clamp(800px, 55%, 1200px);
margin: 30px auto; margin: 30px auto;
padding: 10px;
} }
#resultat { #resultat {
@ -119,9 +127,88 @@ div.content {
margin-bottom: 0; margin-bottom: 0;
} }
@media screen and (max-width: 1000px) { .info {
padding: 10px;
background-color: lightyellow;
margin: 20px 0;
}
form input[type="number"] {
width: 100%;
padding: 5px;
border: none;
background-color: #eee;
font: large monospace;
}
form input[type="number"]:invalid {
background-color: #fdebd0;
}
footer {
margin-top: 20px;
padding: 10px;
text-align: center;
}
div.ln {
margin: 5px 0;
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 5px;
}
div.head {
text-align: center;
font-weight: bold;
}
div.head div {
background-color: #eeeeee;
}
div.ln div {
padding: 5px;
}
div.ln div:nth-child(1) {
padding: 5px 0;
flex-grow: 1;
}
div.ln div:nth-child(2) {
font-weight: bold;
}
div.ln div:nth-child(2), div.ln div:nth-child(5) {
width: 5em;
text-align: center;
}
div.ln div:nth-child(3), div.ln div:nth-child(4) {
padding: 5px;
width: 6em;
align-self: stretch;
}
div.ln div:nth-child(3) {
background-color: #DBC4F0;
}
div.ln div:nth-child(4) {
background-color: #FFCACC;
}
div.ln div.null {
background-color: #eeeeee;
}
@media screen and (max-width: 800px) {
div.content { div.content {
width: 100vw; width: 100%;
margin: 0;
} }
#resultat, .choix-appli-wrapper { #resultat, .choix-appli-wrapper {
@ -138,91 +225,19 @@ div.content {
width: 100%; width: 100%;
} }
div.table_wrapper { div.ln div {
width: calc(100vw - 50px); flex-grow: 1;
} }
fieldset { div.ln {
width: calc(100vw - 40px); margin-top: 10px;
} }
}
.info { div.ln div:nth-child(1) {
padding: 10px; width: calc(70vw + 10px);
background-color: lightyellow; }
margin: 10px 10px;
border: 1px solid #ddd;
}
form { div.ln div:nth-child(3), div.ln div:nth-child(4) {
margin: 10px; width: 35vw;
} }
fieldset {
padding: 10px;
margin: 20px 0;
overflow: auto;
}
div.table_wrapper {
overflow-x: auto;
white-space: nowrap;
}
table {
border-collapse: collapse;
}
td, th {
padding: 5px;
}
th, tr.total td {
border: 2px solid black;
}
td {
border-top: 1px solid #bbb;
border-bottom: 1px solid #bbb;
border-left: 2px solid black;
border-right: 2px solid black;
}
td.null {
background-color: #bbb
}
tr.total {
font-weight: bold;
text-align: center;
}
tr:hover {
background-color: #ffffdd;
}
.note {
width: 60px;
padding: 5px;
border: none;
background-color: #eee;
font: large monospace;
}
.note:invalid, .note[value=""] {
background-color: #ffdddd;
}
label {
display: none;
}
footer {
margin-top: 20px;
padding: 10px;
text-align: center;
}
del {
color: #888;
} }