forked from ScoDoc/ScoDoc
Affichage codes jury recap. en BUT: montre code UE au lieu de sem. + fix id formsemestres UE cap.
This commit is contained in:
parent
6d881915bd
commit
865c3b0414
@ -285,7 +285,17 @@ class ResultatsSemestre(ResultatsCache):
|
||||
else:
|
||||
return None
|
||||
# converti la Series en dict, afin que les np.int64 reviennent en int
|
||||
return ue_cap.to_dict()
|
||||
# et remplace les NaN (venant des NULL en base) par des None
|
||||
ue_cap_dict = ue_cap.to_dict()
|
||||
if ue_cap_dict["formsemestre_id"] is not None and np.isnan(
|
||||
ue_cap_dict["formsemestre_id"]
|
||||
):
|
||||
ue_cap_dict["formsemestre_id"] = None
|
||||
if ue_cap_dict["compense_formsemestre_id"] is not None and np.isnan(
|
||||
ue_cap_dict["compense_formsemestre_id"]
|
||||
):
|
||||
ue_cap_dict["compense_formsemestre_id"] = None
|
||||
return ue_cap_dict
|
||||
|
||||
def get_etud_ue_status(self, etudid: int, ue_id: int) -> dict:
|
||||
"""L'état de l'UE pour cet étudiant.
|
||||
@ -651,8 +661,19 @@ class ResultatsSemestre(ResultatsCache):
|
||||
row["_ues_validables_class"] += " moy_inf"
|
||||
row["_ues_validables_order"] = nb_ues_validables # pour tri
|
||||
if mode_jury and self.validations:
|
||||
dec_sem = self.validations.decisions_jury.get(etudid)
|
||||
jury_code_sem = dec_sem["code"] if dec_sem else ""
|
||||
if self.is_apc:
|
||||
# formations BUT: pas de code semestre, concatene ceux des UE
|
||||
dec_ues = self.validations.decisions_jury_ues.get(etudid)
|
||||
if dec_ues:
|
||||
jury_code_sem = ",".join(
|
||||
[dec_ues[ue_id].get("code", "") for ue_id in dec_ues]
|
||||
)
|
||||
else:
|
||||
jury_code_sem = ""
|
||||
else:
|
||||
# formations classiqes: code semestre
|
||||
dec_sem = self.validations.decisions_jury.get(etudid)
|
||||
jury_code_sem = dec_sem["code"] if dec_sem else ""
|
||||
idx = add_cell(
|
||||
row,
|
||||
"jury_code_sem",
|
||||
@ -668,7 +689,7 @@ class ResultatsSemestre(ResultatsCache):
|
||||
f"""<a href="{url_for('notes.formsemestre_validation_etud_form',
|
||||
scodoc_dept=g.scodoc_dept, formsemestre_id=self.formsemestre.id, etudid=etudid
|
||||
)
|
||||
}">saisir décision</a>""",
|
||||
}">{"saisir" if not jury_code_sem else "modifier"} décision</a>""",
|
||||
"col_jury_link",
|
||||
idx,
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user