Tableau évaluations: ajout colonne type

This commit is contained in:
Emmanuel Viennet 2024-05-20 23:29:25 +02:00
parent 69780b3f24
commit f29002a57d
2 changed files with 10 additions and 4 deletions

View File

@ -70,8 +70,8 @@ def evaluations_recap_table(formsemestre: FormSemestre) -> list[dict]:
Colonnes: Colonnes:
- code (UE ou module), - code (UE ou module),
- titre - titre
- type évaluation
- complete - complete
- publiée
- inscrits (non dem. ni def.) - inscrits (non dem. ni def.)
- nb notes manquantes - nb notes manquantes
- nb ATT - nb ATT
@ -81,9 +81,10 @@ def evaluations_recap_table(formsemestre: FormSemestre) -> list[dict]:
rows = [] rows = []
titles = { titles = {
"type": "", "type": "",
"code": "Code", "code": "Module",
"titre": "", "titre": "",
"date": "Date", "date": "Date",
"type_evaluation": "Type",
"complete": "Comptée", "complete": "Comptée",
"inscrits": "Inscrits", "inscrits": "Inscrits",
"manquantes": "Manquantes", # notes eval non entrées "manquantes": "Manquantes", # notes eval non entrées
@ -114,7 +115,9 @@ def evaluations_recap_table(formsemestre: FormSemestre) -> list[dict]:
rows.append(row) rows.append(row)
line_idx += 1 line_idx += 1
for evaluation_id in modimpl_results.evals_notes: 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] eval_etat = modimpl_results.evaluations_etat[evaluation_id]
row = { row = {
"type": "", "type": "",
@ -128,6 +131,7 @@ def evaluations_recap_table(formsemestre: FormSemestre) -> list[dict]:
"_titre_target_attrs": 'class="discretelink"', "_titre_target_attrs": 'class="discretelink"',
"date": e.date_debut.strftime(scu.DATE_FMT) if e.date_debut else "", "date": e.date_debut.strftime(scu.DATE_FMT) if e.date_debut else "",
"_date_order": e.date_debut.isoformat() 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": "oui" if eval_etat.is_complete else "non",
"_complete_target": "#", "_complete_target": "#",
"_complete_target_attrs": ( "_complete_target_attrs": (

View File

@ -4831,7 +4831,9 @@ table.evaluations_recap th.titre {
} }
table.evaluations_recap td.complete, 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; text-align: center;
} }