1
0
forked from ScoDoc/ScoDoc
This commit is contained in:
Emmanuel Viennet 2022-08-25 18:48:48 +02:00
parent 1e7cc06399
commit 7bc5a5ffd1

View File

@ -693,16 +693,18 @@ sco_publish(
@scodoc7func
def doAddAnnotation(etudid, comment):
"ajoute annotation sur etudiant"
cnx = ndb.GetDBConnexion()
sco_etud.etud_annotations_create(
cnx,
args={
"etudid": etudid,
"comment": comment,
"author": current_user.user_name,
},
)
logdb(cnx, method="addAnnotation", etudid=etudid)
etud = Identite.query.get_or_404(etudid) # check existence
if comment:
cnx = ndb.GetDBConnexion()
sco_etud.etud_annotations_create(
cnx,
args={
"etudid": etudid,
"comment": comment,
"author": current_user.user_name,
},
)
logdb(cnx, method="addAnnotation", etudid=etudid)
return flask.redirect(
url_for("scolar.ficheEtud", scodoc_dept=g.scodoc_dept, etudid=etudid)
)