From 0fd16c8bbbeefb054611b131bb9d9ceeacefd69f Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Wed, 13 Sep 2023 18:15:10 +0200 Subject: [PATCH] =?UTF-8?q?Edition=20=C3=A9valuation.=20Fix=20#731?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/evaluations.py | 4 +++- app/scodoc/sco_evaluation_edit.py | 1 - app/templates/assiduites/pages/visu_assi.j2 | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/models/evaluations.py b/app/models/evaluations.py index 73659aa3..63fac264 100644 --- a/app/models/evaluations.py +++ b/app/models/evaluations.py @@ -536,7 +536,9 @@ def check_convert_evaluation_args(moduleimpl: ModuleImpl, data: dict): raise ScoValueError("invalid note_max value (must be positive or null)") data["note_max"] = note_max # --- coefficient - coef = data.get("coefficient", 1.0) or 1.0 + coef = data.get("coefficient", None) + if coef is None: + coef = 1.0 try: coef = float(coef) except ValueError as exc: diff --git a/app/scodoc/sco_evaluation_edit.py b/app/scodoc/sco_evaluation_edit.py index 0bd8333b..125d4880 100644 --- a/app/scodoc/sco_evaluation_edit.py +++ b/app/scodoc/sco_evaluation_edit.py @@ -46,7 +46,6 @@ from app.scodoc.sco_exceptions import ScoValueError from app.scodoc.TrivialFormulator import TrivialFormulator from app.scodoc import html_sco_header from app.scodoc import sco_evaluations -from app.scodoc import sco_evaluation_db from app.scodoc import sco_moduleimpl from app.scodoc import sco_preferences diff --git a/app/templates/assiduites/pages/visu_assi.j2 b/app/templates/assiduites/pages/visu_assi.j2 index 07fb6974..3f1c3b49 100644 --- a/app/templates/assiduites/pages/visu_assi.j2 +++ b/app/templates/assiduites/pages/visu_assi.j2 @@ -22,7 +22,7 @@ {{tableau | safe}}
-Les comptes sont exprimés en {{ assi_metric }}. +Les comptes sont exprimés en {{ assi_metric | lower}}s.