From cf939587b144541afbb99b713a7231ee19d3bfc5 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Sun, 12 Dec 2021 21:48:26 +0100 Subject: [PATCH] affiche nom ens. sur table list ops --- app/scodoc/sco_undo_notes.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/scodoc/sco_undo_notes.py b/app/scodoc/sco_undo_notes.py index 8b6fea3f..b8b93879 100644 --- a/app/scodoc/sco_undo_notes.py +++ b/app/scodoc/sco_undo_notes.py @@ -133,11 +133,13 @@ def list_operations(evaluation_id): Ops = [] for uid in NotesDates.keys(): + user_name = "{prenomnom} ({user_name})".format(**sco_users.user_info(uid)) for (t0, _), notes in NotesDates[uid].items(): Op = NotesOperation( evaluation_id=evaluation_id, date=t0, uid=uid, + user_name=user_name, notes=NotesDates[uid][t0], current_notes_by_etud=current_notes_by_etud, ) @@ -154,10 +156,10 @@ def evaluation_list_operations(evaluation_id): Ops = list_operations(evaluation_id) - columns_ids = ("datestr", "uid", "nb_notes", "comment") + columns_ids = ("datestr", "user_name", "nb_notes", "comment") titles = { "datestr": "Date", - "uid": "Enseignant", + "user_name": "Enseignant", "nb_notes": "Nb de notes", "comment": "Commentaire", } @@ -181,7 +183,7 @@ def formsemestre_list_saisies_notes(formsemestre_id, format="html"): r = ndb.SimpleDictFetch( """SELECT i.nom, i.prenom, code_nip, n.*, mod.titre, e.description, e.jour, u.user_name FROM notes_notes n, notes_evaluation e, notes_moduleimpl mi, - notes_modules mod, identite i, \"user\" u + notes_modules mod, identite i, "user" u WHERE mi.id = e.moduleimpl_id and mi.module_id = mod.id and e.id = n.evaluation_id