From 03cea5daf7a80a3fd613b1a62633ccb23df40ea9 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Tue, 2 Jul 2024 00:19:30 +0200 Subject: [PATCH] =?UTF-8?q?Fix:=20tableau=20recap.=20avec=20=C3=A9valuatio?= =?UTF-8?q?ns:=20conversion=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/tables/recap.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/tables/recap.py b/app/tables/recap.py index 5b948615..e32ceb0b 100644 --- a/app/tables/recap.py +++ b/app/tables/recap.py @@ -6,6 +6,7 @@ """Table récapitulatif des résultats d'un semestre """ +from functools import partial from flask import g, url_for import numpy as np @@ -71,7 +72,7 @@ class TableRecap(tb.Table): if convert_values: self.fmt_note = scu.fmt_note else: - self.fmt_note = lambda x: x + self.fmt_note = partial(scu.fmt_note, keep_numeric=True) # couples (modimpl, ue) effectivement présents dans la table: self.modimpl_ue_ids = set() @@ -410,7 +411,7 @@ class TableRecap(tb.Table): if e.evaluation_type != Evaluation.EVALUATION_BONUS else "" ) - content = self.fmt_note(val) + content = self.fmt_note(val, note_max=e.note_max) if e.evaluation_type != Evaluation.EVALUATION_BONUS: classes = col_classes + [ {