From bf57f2bfa5590c7c44b5b95957d3f72ed7973e64 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Mon, 27 Sep 2021 17:33:44 +0200 Subject: [PATCH] =?UTF-8?q?remet=20nom=20auteurs=20annotations=20=C3=A9tud?= =?UTF-8?q?iants?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/scodoc/sco_page_etud.py | 7 +++++-- app/views/scolar.py | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/scodoc/sco_page_etud.py b/app/scodoc/sco_page_etud.py index 7a840c3a12..424e835cf2 100644 --- a/app/scodoc/sco_page_etud.py +++ b/app/scodoc/sco_page_etud.py @@ -47,6 +47,7 @@ from app.scodoc import sco_groups from app.scodoc import sco_parcours_dut from app.scodoc import sco_permissions_check from app.scodoc import sco_photos +from app.scodoc import sco_users from app.scodoc import sco_report from app.scodoc import sco_etud from app.scodoc.sco_bulletins import etud_descr_situation_semestre @@ -300,9 +301,11 @@ def ficheEtud(etudid=None): title="Supprimer cette annotation", ), ) + author = sco_users.user_info(a["author"]) alist.append( - 'Le %(date)s par %(author)s : %(comment)s%(dellink)s' - % a + f"""Le {a['date']} par {author['prenomnom']} : + {a['comment']}{a['dellink']} + """ ) info["liste_annotations"] = "\n".join(alist) # fiche admission diff --git a/app/views/scolar.py b/app/views/scolar.py index f2ccf4ff78..a84cdfeedf 100644 --- a/app/views/scolar.py +++ b/app/views/scolar.py @@ -541,7 +541,7 @@ def doAddAnnotation(etudid, comment): args={ "etudid": etudid, "comment": comment, - "authenticated_user": current_user.user_name, + "author": current_user.user_name, }, ) logdb(cnx, method="addAnnotation", etudid=etudid)