From e06cf82db85ddc009aaec72548a61d87a102e505 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Thu, 16 Dec 2021 00:03:24 +0100 Subject: [PATCH] Modification bulletins BUT: plus de moyennes indicatives de module --- app/but/bulletin_but.py | 34 +++++++++++++++++----------------- app/static/js/bulletin-but.js | 9 +-------- 2 files changed, 18 insertions(+), 25 deletions(-) diff --git a/app/but/bulletin_but.py b/app/but/bulletin_but.py index a62e9c05..c9caec21 100644 --- a/app/but/bulletin_but.py +++ b/app/but/bulletin_but.py @@ -152,18 +152,18 @@ class ResultatsSemestreBUT: etud_idx = self.etud_index[etud.id] for mi in modimpls: mod_idx = self.modimpl_coefs_df.columns.get_loc(mi.id) - # moyennes indicatives (moyennes de moyennes d'UE) - try: - moyennes_etuds = np.nan_to_num( - np.nanmean(self.sem_cube[:, mod_idx, :], axis=1), - copy=False, - ) - except RuntimeWarning: # all nans in np.nanmean (sur certains etuds sans notes valides) - pass - try: - moy_indicative_mod = np.nanmean(self.sem_cube[etud_idx, mod_idx]) - except RuntimeWarning: # all nans in np.nanmean - pass + # # moyennes indicatives (moyennes de moyennes d'UE) + # try: + # moyennes_etuds = np.nan_to_num( + # np.nanmean(self.sem_cube[:, mod_idx, :], axis=1), + # copy=False, + # ) + # except RuntimeWarning: # all nans in np.nanmean (sur certains etuds sans notes valides) + # pass + # try: + # moy_indicative_mod = np.nanmean(self.sem_cube[etud_idx, mod_idx]) + # except RuntimeWarning: # all nans in np.nanmean + # pass d[mi.module.code] = { "id": mi.id, "titre": mi.module.titre, @@ -174,11 +174,11 @@ class ResultatsSemestreBUT: moduleimpl_id=mi.id, ), "moyenne": { - # moyenne indicative de module: moyenne des UE, ignorant celles sans notes (nan) - "value": fmt_note(moy_indicative_mod), - "min": fmt_note(moyennes_etuds.min()), - "max": fmt_note(moyennes_etuds.max()), - "moy": fmt_note(moyennes_etuds.mean()), + # # moyenne indicative de module: moyenne des UE, ignorant celles sans notes (nan) + # "value": fmt_note(moy_indicative_mod), + # "min": fmt_note(moyennes_etuds.min()), + # "max": fmt_note(moyennes_etuds.max()), + # "moy": fmt_note(moyennes_etuds.mean()), }, "evaluations": [ self.etud_eval_results(etud, e) diff --git a/app/static/js/bulletin-but.js b/app/static/js/bulletin-but.js index f768f41b..cd562fe1 100644 --- a/app/static/js/bulletin-but.js +++ b/app/static/js/bulletin-but.js @@ -172,14 +172,7 @@ function showEvaluations(data) {

${numero} - ${content.titre}

-
-
Moyenne indicative : ${content.moyenne.value}
-
- Classe : ${content.moyenne.moy} - - Max : ${content.moyenne.max} - - Min : ${content.moyenne.min} -
-
+
Abs inj.
${content.absences?.injustifie || 0}
Total
${content.absences?.total || 0}