recap UE: filtre modules avec coef nul

This commit is contained in:
Emmanuel Viennet 2021-12-06 09:21:15 +01:00
parent e4b9a48ebf
commit 20470484d1

View File

@ -97,15 +97,17 @@ class ResultatsSemestreBUT:
ue_idx = self.modimpl_coefs_df.index.get_loc(ue.id) ue_idx = self.modimpl_coefs_df.index.get_loc(ue.id)
etud_moy_module = self.sem_cube[etud_idx] # module x UE etud_moy_module = self.sem_cube[etud_idx] # module x UE
for mi in modimpls: for mi in modimpls:
d[mi.module.code] = { coef = self.modimpl_coefs_df[mi.id][ue.id]
"id": mi.id, if coef > 0:
"coef": self.modimpl_coefs_df[mi.id][ue.id], d[mi.module.code] = {
"moyenne": jsnan( "id": mi.id,
etud_moy_module[self.modimpl_coefs_df.columns.get_loc(mi.id)][ "coef": coef,
ue_idx "moyenne": jsnan(
] etud_moy_module[self.modimpl_coefs_df.columns.get_loc(mi.id)][
), ue_idx
} ]
),
}
return d return d
def etud_ue_results(self, etud, ue): def etud_ue_results(self, etud, ue):
@ -211,6 +213,9 @@ class ResultatsSemestreBUT:
"injustifie": 1, "injustifie": 1,
"total": 33, "total": 33,
}, },
"etapes": { # XXX TODO
# à spécifier: liste des étapes Apogée
},
"date_debut": formsemestre.date_debut.isoformat(), "date_debut": formsemestre.date_debut.isoformat(),
"date_fin": formsemestre.date_fin.isoformat(), "date_fin": formsemestre.date_fin.isoformat(),
"annee_universitaire": self.formsemestre.annee_scolaire_str(), "annee_universitaire": self.formsemestre.annee_scolaire_str(),