diff --git a/app/comp/res_compat.py b/app/comp/res_compat.py index 1ebac8b176..9749707ab7 100644 --- a/app/comp/res_compat.py +++ b/app/comp/res_compat.py @@ -7,6 +7,7 @@ """Classe résultats pour compatibilité avec le code ScoDoc 7 """ from functools import cached_property +import pandas as pd from flask import flash, g, Markup, url_for @@ -166,10 +167,18 @@ class NotesTableCompat(ResultatsSemestre): moy_gen_rangs_by_group[group_id] ue_rangs_by_group[group_id] """ + mask_inscr = pd.Series( + [ + self.formsemestre.etuds_inscriptions[etudid].etat == scu.INSCRIT + for etudid in self.etud_moy_gen.index + ], + dtype=float, + index=self.etud_moy_gen.index, + ) ( self.etud_moy_gen_ranks, self.etud_moy_gen_ranks_int, - ) = moy_sem.comp_ranks_series(self.etud_moy_gen) + ) = moy_sem.comp_ranks_series(self.etud_moy_gen * mask_inscr) ues = self.formsemestre.query_ues() for ue in ues: moy_ue = self.etud_moy_ue[ue.id]