Merge branch 'master' of https://scodoc.org/git/ScoDoc/ScoDoc into api
This commit is contained in:
commit
6842669ffe
@ -60,7 +60,7 @@ class ResultatsSemestreClassic(NotesTableCompat):
|
||||
)
|
||||
self.modimpl_inscr_df = inscr_mod.df_load_modimpl_inscr(self.formsemestre)
|
||||
self.modimpl_coefs = np.array(
|
||||
[m.module.coefficient for m in self.formsemestre.modimpls_sorted]
|
||||
[m.module.coefficient or 0.0 for m in self.formsemestre.modimpls_sorted]
|
||||
)
|
||||
self.modimpl_idx = {
|
||||
m.id: i for i, m in enumerate(self.formsemestre.modimpls_sorted)
|
||||
@ -113,8 +113,16 @@ class ResultatsSemestreClassic(NotesTableCompat):
|
||||
self.etud_moy_ue += self.bonus_ues # somme les dataframes
|
||||
self.etud_moy_ue.clip(lower=0.0, upper=20.0, inplace=True)
|
||||
bonus_mg = bonus.get_bonus_moy_gen()
|
||||
if bonus_mg is not None:
|
||||
if bonus_mg is None and self.bonus_ues is not None:
|
||||
# pas de bonus explicite sur la moyenne générale
|
||||
# on l'ajuste pour refléter les modifs d'UE, à l'aide des coefs d'UE.
|
||||
self.etud_moy_gen += (self.etud_coef_ue_df * self.bonus_ues).sum(
|
||||
axis=1
|
||||
) / self.etud_coef_ue_df.sum(axis=1)
|
||||
elif bonus_mg:
|
||||
# Applique le bonus moyenne générale renvoyé
|
||||
self.etud_moy_gen += bonus_mg
|
||||
|
||||
self.etud_moy_gen.clip(lower=0.0, upper=20.0, inplace=True)
|
||||
# compat nt, utilisé pour l'afficher sur les bulletins:
|
||||
self.bonus = bonus_mg
|
||||
|
Loading…
Reference in New Issue
Block a user