From 2d2d62fb71b9e1bd4319b47c62ca9ad68af8b5ba Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Tue, 29 Mar 2022 10:26:44 +0200 Subject: [PATCH] Meilleur msg erreur si manque ECTS --- app/comp/res_compat.py | 15 +++++++++++++-- sco_version.py | 2 +- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/app/comp/res_compat.py b/app/comp/res_compat.py index 690f7099..5d7b80c2 100644 --- a/app/comp/res_compat.py +++ b/app/comp/res_compat.py @@ -8,7 +8,7 @@ """ from functools import cached_property -from flask import g, flash +from flask import flash, g, Markup, url_for from app import log from app.comp import moy_sem @@ -123,8 +123,19 @@ class NotesTableCompat(ResultatsSemestre): if check_apc_ects and self.is_apc and not hasattr(g, "checked_apc_ects"): g.checked_apc_ects = True if None in [ue.ects for ue in ues if ue.type != UE_SPORT]: + formation = self.formsemestre.formation + ue_sans_ects = [ + ue for ue in ues if ue.type != UE_SPORT and ue.ects is None + ] flash( - """Calcul moyenne générale impossible: ECTS des UE manquants !""", + Markup( + f"""Calcul moyenne générale impossible: ECTS des UE manquants !
+ (dans {' ,'.join([ue.acronyme for ue in ue_sans_ects])} + de la formation: {formation.get_titre_version()}) + ) + """ + ), category="danger", ) return ues_dict diff --git a/sco_version.py b/sco_version.py index 1e0c6c77..0073ad41 100644 --- a/sco_version.py +++ b/sco_version.py @@ -1,7 +1,7 @@ # -*- mode: python -*- # -*- coding: utf-8 -*- -SCOVERSION = "9.1.87" +SCOVERSION = "9.1.88" SCONAME = "ScoDoc"