From f29002a57d3b663fba49ca96358e02dd4ed69969 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Mon, 20 May 2024 23:29:25 +0200 Subject: [PATCH] =?UTF-8?q?Tableau=20=C3=A9valuations:=20ajout=20colonne?= =?UTF-8?q?=20type?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/scodoc/sco_evaluation_recap.py | 10 +++++++--- app/static/css/scodoc.css | 4 +++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/app/scodoc/sco_evaluation_recap.py b/app/scodoc/sco_evaluation_recap.py index 514d6030..2648c33d 100644 --- a/app/scodoc/sco_evaluation_recap.py +++ b/app/scodoc/sco_evaluation_recap.py @@ -70,8 +70,8 @@ def evaluations_recap_table(formsemestre: FormSemestre) -> list[dict]: Colonnes: - code (UE ou module), - titre + - type évaluation - complete - - publiée - inscrits (non dem. ni def.) - nb notes manquantes - nb ATT @@ -81,9 +81,10 @@ def evaluations_recap_table(formsemestre: FormSemestre) -> list[dict]: rows = [] titles = { "type": "", - "code": "Code", + "code": "Module", "titre": "", "date": "Date", + "type_evaluation": "Type", "complete": "Comptée", "inscrits": "Inscrits", "manquantes": "Manquantes", # notes eval non entrées @@ -114,7 +115,9 @@ def evaluations_recap_table(formsemestre: FormSemestre) -> list[dict]: rows.append(row) line_idx += 1 for evaluation_id in modimpl_results.evals_notes: - e = db.session.get(Evaluation, evaluation_id) + e: Evaluation = db.session.get(Evaluation, evaluation_id) + if e is None: + continue # ignore errors (rare race conditions?) eval_etat = modimpl_results.evaluations_etat[evaluation_id] row = { "type": "", @@ -128,6 +131,7 @@ def evaluations_recap_table(formsemestre: FormSemestre) -> list[dict]: "_titre_target_attrs": 'class="discretelink"', "date": e.date_debut.strftime(scu.DATE_FMT) if e.date_debut else "", "_date_order": e.date_debut.isoformat() if e.date_debut else "", + "type_evaluation": e.type_abbrev(), "complete": "oui" if eval_etat.is_complete else "non", "_complete_target": "#", "_complete_target_attrs": ( diff --git a/app/static/css/scodoc.css b/app/static/css/scodoc.css index fa08e535..d0977f11 100644 --- a/app/static/css/scodoc.css +++ b/app/static/css/scodoc.css @@ -4831,7 +4831,9 @@ table.evaluations_recap th.titre { } table.evaluations_recap td.complete, -table.evaluations_recap th.complete { +table.evaluations_recap th.complete, +table.evaluations_recap td.type_evaluation, +table.evaluations_recap th.type_evaluation { text-align: center; }