1
0
forked from ScoDoc/ScoDoc

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