From fafc215d197d783d56c33e15b1dcad15dbf34230 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Thu, 23 Feb 2023 22:35:59 +0100 Subject: [PATCH] Rangs moy gen: place les DEM en fin. (WIP: pas encore les autres rangs) --- app/comp/res_compat.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app/comp/res_compat.py b/app/comp/res_compat.py index 1ebac8b17..9749707ab 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]