From 7794fff4a5f5e4c6acb4741be35e5de666be8b02 Mon Sep 17 00:00:00 2001 From: viennet Date: Wed, 23 Dec 2020 22:27:21 +0100 Subject: [PATCH] Fix: export excel des evaluations en attente --- sco_evaluations.py | 2 +- sco_moduleimpl_status.py | 5 ++--- sco_recapcomplet.py | 22 ++++++++++++++++++---- static/css/scodoc.css | 1 + 4 files changed, 22 insertions(+), 8 deletions(-) diff --git a/sco_evaluations.py b/sco_evaluations.py index a2faa17be..2b38a1ecb 100644 --- a/sco_evaluations.py +++ b/sco_evaluations.py @@ -337,7 +337,7 @@ def do_evaluation_list_in_sem(context, formsemestre_id): 'visibulletin': 1} ] """ - req = "select E.* from notes_evaluation E, notes_moduleimpl MI where MI.formsemestre_id = %(formsemestre_id)s and MI.moduleimpl_id = E.moduleimpl_id" + req = "select E.* from notes_evaluation E, notes_moduleimpl MI where MI.formsemestre_id = %(formsemestre_id)s and MI.moduleimpl_id = E.moduleimpl_id order by moduleimpl_id, numero desc, jour desc, heure_debut desc" cnx = context.GetDBConnexion() cursor = cnx.cursor(cursor_factory=ScoDocCursor) cursor.execute(req, {"formsemestre_id": formsemestre_id}) diff --git a/sco_moduleimpl_status.py b/sco_moduleimpl_status.py index 21dd699b0..77abe96f0 100644 --- a/sco_moduleimpl_status.py +++ b/sco_moduleimpl_status.py @@ -337,12 +337,11 @@ def moduleimpl_status(context, moduleimpl_id=None, partition_id=None, REQUEST=No % etat["last_modif"].strftime("%d/%m/%Y à %Hh%M") ) H.append('') - if has_expression: + if has_expression or True: H.append( - """%02d""" + """%2d""" % eval_index ) - # Fleches: H.append('') if eval_index != (len(ModEvals) - 1) and caneditevals: diff --git a/sco_recapcomplet.py b/sco_recapcomplet.py index e40a083e3..022983f01 100644 --- a/sco_recapcomplet.py +++ b/sco_recapcomplet.py @@ -764,7 +764,11 @@ def _list_notes_evals(context, evals, etudid): """ L = [] for e in evals: - if e["etat"]["evalcomplete"] or e["publish_incomplete"]: + if ( + e["etat"]["evalcomplete"] + or e["etat"]["evalattente"] + or e["publish_incomplete"] + ): NotesDB = context._notes_getall(e["evaluation_id"]) if NotesDB.has_key(etudid): val = NotesDB[etudid]["value"] @@ -779,9 +783,15 @@ def _list_notes_evals(context, evals, etudid): def _list_notes_evals_titles(context, codemodule, evals): """Liste des titres des evals completes""" L = [] + eval_index = len(evals) - 1 for e in evals: - if e["etat"]["evalcomplete"] or e["publish_incomplete"]: - L.append(codemodule + "-" + str(e["numero"]) + "-" + e["jour"].isoformat()) + if ( + e["etat"]["evalcomplete"] + or e["etat"]["evalattente"] + or e["publish_incomplete"] + ): + L.append(codemodule + "-" + str(eval_index) + "-" + e["jour"].isoformat()) + eval_index -= 1 return L @@ -789,7 +799,11 @@ def _list_notes_evals_stats(context, evals, key): """Liste des stats (moy, ou rien!) des evals completes""" L = [] for e in evals: - if e["etat"]["evalcomplete"] or e["publish_incomplete"]: + if ( + e["etat"]["evalcomplete"] + or e["etat"]["evalattente"] + or e["publish_incomplete"] + ): if key == "moy": val = e["etat"]["moy_num"] L.append(fmt_note(val, keep_numeric=True)) diff --git a/static/css/scodoc.css b/static/css/scodoc.css index 9b7868748..875361b1c 100644 --- a/static/css/scodoc.css +++ b/static/css/scodoc.css @@ -1338,6 +1338,7 @@ span.evalindex_cont { } span.evalindex { font-weight: normal; + font-size: 80%; margin-right: 5px; } .eval_arrows_chld {