diff --git a/BCG/calcul.js b/BCG/calcul.js new file mode 100755 index 0000000..3ab806b --- /dev/null +++ b/BCG/calcul.js @@ -0,0 +1,227 @@ +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 = "0"; + 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 = "0"; + 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 = "0"; + 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 = "0"; + 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 = "0"; + 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; +} \ No newline at end of file diff --git a/BCG/index.html b/BCG/index.html new file mode 100755 index 0000000..c96f464 --- /dev/null +++ b/BCG/index.html @@ -0,0 +1,404 @@ + + +
+ + + +Points
+Coefficients
+Note finale
+Décision
+Points jusqu'à la
décision supérieure