1
0
forked from ScoDoc/ScoDoc

Fix 2 bugs / fiche etud

This commit is contained in:
Emmanuel Viennet 2022-02-10 12:13:24 +01:00
parent f5bc6fb1d1
commit c05660bf83
3 changed files with 9 additions and 7 deletions

View File

@ -123,6 +123,7 @@ class Identite(db.Model):
e = dict(self.__dict__)
e.pop("_sa_instance_state", None)
# ScoDoc7 output_formators: (backward compat)
e["etudid"] = self.id
e["date_naissance"] = ndb.DateISOtoDMY(e["date_naissance"])
return {k: e[k] or "" for k in e} # convert_null_outputs_to_empty

View File

@ -560,7 +560,7 @@ def formsemestre_recap_parcours_table(
else:
type_sem = ""
class_sem = "sem_autre"
if sem["formation_code"] != Se.formation["formation_code"]:
if sem["formation_code"] != Se.formation.formation_code:
class_sem += " sem_autre_formation"
if sem["bul_bgcolor"]:
bgcolor = sem["bul_bgcolor"]
@ -628,7 +628,7 @@ def formsemestre_recap_parcours_table(
if not sem["etat"]: # locked
lockicon = scu.icontag("lock32_img", title="verrouillé", border="0")
default_sem_info += lockicon
if sem["formation_code"] != Se.formation["formation_code"]:
if sem["formation_code"] != Se.formation.formation_code:
default_sem_info += "Autre formation: %s" % sem["formation_code"]
H.append(
'<td class="datefin">%s</td><td class="sem_info">%s</td>'

View File

@ -101,6 +101,7 @@ def _descr_decisions_ues(nt, etudid, decisions_ue, decision_sem):
except:
log("descr_decisions_ues: ue_id=%s decisions_ue=%s" % (ue_id, decisions_ue))
# Les UE capitalisées dans d'autres semestres:
if etudid in nt.validations.ue_capitalisees.index:
for ue_id in nt.validations.ue_capitalisees.loc[etudid]["ue_id"]:
try:
uelist.append(nt.get_etud_ue_status(etudid, ue_id)["ue"])