From c8d693ba03f926d8df15d4a21f06da66d49dc175 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Sun, 30 Jan 2022 23:22:21 +0100 Subject: [PATCH] =?UTF-8?q?BUT:=20force=20le=20coef=20des=20modules=20spor?= =?UTF-8?q?t=20=C3=A0=200?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/comp/res_but.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/app/comp/res_but.py b/app/comp/res_but.py index 266cda97c..4423f3fa1 100644 --- a/app/comp/res_but.py +++ b/app/comp/res_but.py @@ -46,9 +46,15 @@ class ResultatsSemestreBUT(NotesTableCompat): # modimpl_coefs_df.columns.get_loc(modimpl.id) # idx de l'UE: modimpl_coefs_df.index.get_loc(ue.id) - # Elimine les coefs des UE bonus sports XXX inutile car df_load_modimpl_coefs sans bonus - # no_bonus = [ue.type != UE_SPORT for ue in self.ues] - # modimpl_coefs_no_bonus_df = self.modimpl_coefs_df[no_bonus] + # Elimine les coefs des modimpl bonus sports: + modimpls_sport = [ + modimpl + for modimpl in self.formsemestre.modimpls_sorted + if modimpl.module.ue.type == UE_SPORT + ] + for modimpl in modimpls_sport: + self.modimpl_coefs_df[modimpl.id] = 0 + self.etud_moy_ue = moy_ue.compute_ue_moys_apc( self.sem_cube, self.etuds, @@ -63,12 +69,7 @@ class ResultatsSemestreBUT(NotesTableCompat): ) # --- Bonus Sport & Culture - modimpl_sport = [ - modimpl - for modimpl in self.formsemestre.modimpls_sorted - if modimpl.module.ue.type == UE_SPORT - ] - if len(modimpl_sport) > 0: + if len(modimpls_sport) > 0: bonus_class = ScoDocSiteConfig.get_bonus_sport_class() if bonus_class is not None: bonus: BonusSport = bonus_class(