Fix: enregistre moyenne des UEs antérieures non ADM

This commit is contained in:
Emmanuel Viennet 2023-07-04 23:26:14 +02:00
parent cf0d3c06c4
commit a2c5be22cb

View File

@ -949,6 +949,7 @@ def do_formsemestre_validate_ue(
"ue_id": ue_id,
"semestre_id": semestre_id,
"is_external": is_external,
"moy_ue": moy_ue,
}
if date:
args["event_date"] = date
@ -965,12 +966,11 @@ def do_formsemestre_validate_ue(
cursor.execute("delete from scolar_formsemestre_validation where " + cond, args)
# insert
args["code"] = code
if code == ADM:
if moy_ue is None:
# stocke la moyenne d'UE capitalisée:
ue_status = nt.get_etud_ue_status(etudid, ue_id)
moy_ue = ue_status["moy"] if ue_status else ""
args["moy_ue"] = moy_ue
if (code == ADM) and (moy_ue is None):
# stocke la moyenne d'UE capitalisée:
ue_status = nt.get_etud_ue_status(etudid, ue_id)
moy_ue = ue_status["moy"] if ue_status else ""
log("formsemestre_validate_ue: create %s" % args)
if code is not None:
scolar_formsemestre_validation_create(cnx, args)