Pas de rangs dans les modimpls

This commit is contained in:
Emmanuel Viennet 2022-02-11 16:34:02 +01:00
parent 7c0b281b3c
commit 8d963db983
3 changed files with 13 additions and 7 deletions

View File

@ -311,9 +311,7 @@ class NotesTableCompat(ResultatsSemestre):
self.bonus = None # virtuel
self.bonus_ues = None # virtuel
self.ue_rangs = {u.id: (None, nb_etuds) for u in self.ues}
self.mod_rangs = {
m.id: (None, nb_etuds) for m in self.formsemestre.modimpls_sorted
}
self.mod_rangs = None # sera surchargé en Classic, mais pas en APC
self.moy_min = "NA"
self.moy_max = "NA"
self.moy_moy = "NA"

View File

@ -621,7 +621,12 @@ def _ue_mod_bulletin(etudid, formsemestre_id, ue_id, modimpls, nt, version):
e["note_txt"] = e["note_html"] = ""
e["coef_txt"] = scu.fmt_coef(e["coefficient"])
# Classement
if bul_show_mod_rangs and mod["mod_moy_txt"] != "-" and not is_malus:
if (
bul_show_mod_rangs
and (nt.mod_rangs is not None)
and mod["mod_moy_txt"] != "-"
and not is_malus
):
rg = nt.mod_rangs[modimpl["moduleimpl_id"]]
if rg[0] is None:
mod["mod_rang_txt"] = ""

View File

@ -86,9 +86,12 @@ def etud_get_poursuite_info(sem, etud):
nt.get_etud_mod_moy(modimpl["moduleimpl_id"], etudid)
)
if noteModule != "NI": # si étudiant inscrit au module
rangModule = nt.mod_rangs[modimpl["moduleimpl_id"]][0][
etudid
]
if nt.mod_rangs is not None:
rangModule = nt.mod_rangs[modimpl["moduleimpl_id"]][
0
][etudid]
else:
rangModule = ""
modules.append([codeModule, noteModule])
rangs.append(["rang_" + codeModule, rangModule])