From 50191e6f770e0eb121f2d068fad5fb43d6a20897 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 1ebac8b1..9749707a 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]