forked from ScoDoc/ScoDoc
Fix edit evaluation non APC
This commit is contained in:
parent
e706407bcb
commit
84f25817d1
app
@ -321,10 +321,11 @@ def evaluation_create_form(
|
||||
else:
|
||||
# creation d'une evaluation
|
||||
evaluation_id = sco_evaluation_db.do_evaluation_create(**tf[2])
|
||||
# Set poids
|
||||
evaluation = models.Evaluation.query.get(evaluation_id)
|
||||
for ue in sem_ues:
|
||||
evaluation.set_ue_poids(ue, tf[2][f"poids_{ue.id}"])
|
||||
db.session.add(evaluation)
|
||||
db.session.commit()
|
||||
if is_apc:
|
||||
# Set poids
|
||||
evaluation = models.Evaluation.query.get(evaluation_id)
|
||||
for ue in sem_ues:
|
||||
evaluation.set_ue_poids(ue, tf[2][f"poids_{ue.id}"])
|
||||
db.session.add(evaluation)
|
||||
db.session.commit()
|
||||
return flask.redirect(dest_url)
|
||||
|
@ -1619,7 +1619,7 @@ def evaluation_delete(evaluation_id):
|
||||
)
|
||||
)
|
||||
else:
|
||||
sco_evaluations.do_evaluation_delete(E["evaluation_id"])
|
||||
sco_evaluation_db.do_evaluation_delete(E["evaluation_id"])
|
||||
return (
|
||||
"\n".join(H)
|
||||
+ f"""<p>OK, évaluation supprimée.</p>
|
||||
|
Loading…
Reference in New Issue
Block a user