1
0
forked from ScoDoc/ScoDoc

Fix: calcul moyenne générale BUT si aucune UE

This commit is contained in:
Emmanuel Viennet 2023-08-22 18:00:13 +02:00
parent efaeeb7b5f
commit 262d68c844
2 changed files with 5 additions and 1 deletions

View File

@ -78,7 +78,11 @@ def compute_sem_moys_apc_using_ects(
else:
ects = ects_df.to_numpy()
# ects est maintenant un array nb_etuds x nb_ues
moy_gen = (etud_moy_ue_df * ects).sum(axis=1) / ects.sum(axis=1)
except ZeroDivisionError:
# peut arriver si aucun module... on ignore
moy_gen = pd.Series(np.NaN, index=etud_moy_ue_df.index)
except TypeError:
if None in ects:
formation = db.session.get(Formation, formation_id)

View File

@ -260,7 +260,7 @@ class AssiduitesMetrics:
"""Labels associés au métrique de l'assiduité"""
SHORT: list[str] = ["1/2 J.", "J.", "H."]
LONG: list[str] = ["Demi-Journée", "Journée", "Heure"]
LONG: list[str] = ["Demi-journée", "Journée", "Heure"]
TAG: list[str] = ["demi", "journee", "heure"]