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(