BUT: force le coef des modules sport à 0

This commit is contained in:
Emmanuel Viennet 2022-01-30 23:22:21 +01:00
parent 12fcab5b76
commit c8d693ba03

View File

@ -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(