Mise à jour ergonomique et fonctionnelle

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

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 property="og:image" content="https://simulation.wikibac.fr/res/logo.png">
<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>
<body onload="update()">
<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>
</div>
<form onchange="update()" id="calculateur">
<fieldset>
<legend>Contrôle continu</legend>
<p>
Pour les notes empruntées au livret scolaire (c'est-à-dire la moyenne de l'année),
il faut arrondir la note au dixième à l'excès&nbsp;: par exemple, pour une moyenne annuelle de 16,54,
il faut arrondir à 16,6.
</p>
<div class="table_wrapper">
<table>
<tr>
<th rowspan="2">Matière</th>
<th colspan="3">Première</th>
<th colspan="3">Terminale</th>
</tr>
<tr>
<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>
<form onchange="update()" id="simulateur">
<div class="ln head">
<div>Matière</div>
<div>Coef.</div>
<div>Première</div>
<div>Terminale</div>
<div>Points</div>
</div>
<h2>Contrôle continu</h2>
<div class="section">
<div class="ln">
<div>Enseignement moral et civique</div>
<div>2</div>
<div><input type="number" min=0 max=20 step=.1 name="EMC-1re-note" id="EMC-1re-note"
aria-label="Note d'enseignement moral et civique de première" required></div>
<div><input type="number" min=0 max=20 step=.1 name="EMC-tle-note" id="EMC-tle-note"
aria-label="Note d'enseignement moral et civique de terminale" required></div>
<div id="EMC-points"></div>
</div>
</fieldset>
<fieldset>
<legend>Épreuves terminales</legend>
<p>Remarque&nbsp;: Seules ces épreuves peuvent faire l'objet d'un éventuel rattrapage (sauf épreuve orale terminale).</p>
<div class="table_wrapper">
<table>
<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 class="ln">
<div>Langue vivante A</div>
<div>6</div>
<div><input type="number" min=0 max=20 step=.1 name="LVA-1re-note" id="LVA-1re-note"
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"
aria-label="Note de langue vivante A de terminale" required></div>
<div id="LVA-points"></div>
</div>
</fieldset>
<fieldset>
<legend>Option(s)</legend>
<p>
Pour les notes empruntées au livret scolaire (c'est-à-dire la moyenne de l'année),
il faut arrondir la note au dixième à l'excès&nbsp;: par exemple, pour une moyenne annuelle de 16,54,
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>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 class="ln">
<div>Langue vivante B</div>
<div>6</div>
<div><input type="number" min=0 max=20 step=.1 name="LVB-1re-note" id="LVB-1re-note"
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"
aria-label="Note de langue vivante B de terminale" required></div>
<div id="LVB-points"></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>
</div>
</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);
}