From 8fb5d5011446951105d23fa814a7eca18f9328da Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Fri, 16 Dec 2022 23:33:04 -0300 Subject: [PATCH] =?UTF-8?q?Fix:=20jury=20BUT=20/=20UE=20si=20pas=20de=20r?= =?UTF-8?q?=C3=A9sultat,=20tableau=20bord=20module=20si=20absence=20de=20p?= =?UTF-8?q?oids.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/but/jury_but.py | 6 ++++-- app/scodoc/htmlutils.py | 2 +- app/scodoc/sco_moduleimpl_status.py | 6 +++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app/but/jury_but.py b/app/but/jury_but.py index cae9e46a..7521d282 100644 --- a/app/but/jury_but.py +++ b/app/but/jury_but.py @@ -984,6 +984,10 @@ class DecisionsProposeesUE(DecisionsProposees): "Le rcue auquel est rattaché cette UE, ou None" self.inscription_etat = inscription_etat "inscription: I, DEM, DEF dans le semestre de cette UE" + self.moy_ue = np.NaN + self.moy_ue_with_cap = np.NaN + self.ue_status = {} + if ue.type == sco_codes.UE_SPORT: self.explanation = "UE bonus, pas de décision de jury" self.codes = [] # aucun code proposé @@ -994,8 +998,6 @@ class DecisionsProposeesUE(DecisionsProposees): self.codes = [ sco_codes.DEM if inscription_etat == scu.DEMISSION else sco_codes.DEF ] - self.moy_ue = self.moy_ue_with_cap = np.NaN - self.ue_status = {} return # Moyenne de l'UE ? diff --git a/app/scodoc/htmlutils.py b/app/scodoc/htmlutils.py index 65101f1f..725a4f4e 100644 --- a/app/scodoc/htmlutils.py +++ b/app/scodoc/htmlutils.py @@ -83,7 +83,7 @@ def histogram_notes(notes): return "\n".join(D) -def make_menu(title, items, css_class="", alone=False): +def make_menu(title, items, css_class="", alone=False) -> str: """HTML snippet to render a simple drop down menu. items is a list of dicts: { 'title' : diff --git a/app/scodoc/sco_moduleimpl_status.py b/app/scodoc/sco_moduleimpl_status.py index b40f0c7d..9f2b0cdf 100644 --- a/app/scodoc/sco_moduleimpl_status.py +++ b/app/scodoc/sco_moduleimpl_status.py @@ -64,7 +64,7 @@ from app.scodoc import sco_users # ported from old DTML code in oct 2009 # menu evaluation dans moduleimpl -def moduleimpl_evaluation_menu(evaluation_id, nbnotes=0): +def moduleimpl_evaluation_menu(evaluation_id, nbnotes=0) -> str: "Menu avec actions sur une evaluation" E = sco_evaluation_db.do_evaluation_list({"evaluation_id": evaluation_id})[0] modimpl = sco_moduleimpl.moduleimpl_list(moduleimpl_id=E["moduleimpl_id"])[0] @@ -817,9 +817,9 @@ def _evaluation_poids_html(evaluation: Evaluation, max_poids: float = 0.0) -> st """graphe html (Hinton map) montrant les poids x coef de l'évaluation""" ue_poids = evaluation.get_ue_poids_dict(sort=True) # { ue_id : poids } if not ue_poids: - return + return "" if max_poids < scu.NOTES_PRECISION: - return + return "" H = ( """
""" + "\n".join(