forked from ScoDoc/ScoDoc
Meilleur msg erreur si manque ECTS
This commit is contained in:
parent
501d43f709
commit
2d2d62fb71
@ -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 !<br>
|
||||
(dans {' ,'.join([ue.acronyme for ue in ue_sans_ects])}
|
||||
de la formation: <a href="{url_for("notes.ue_table",
|
||||
scodoc_dept=g.scodoc_dept, formation_id=formation.id)}">{formation.get_titre_version()}</a>)
|
||||
)
|
||||
"""
|
||||
),
|
||||
category="danger",
|
||||
)
|
||||
return ues_dict
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- mode: python -*-
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
SCOVERSION = "9.1.87"
|
||||
SCOVERSION = "9.1.88"
|
||||
|
||||
SCONAME = "ScoDoc"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user