Fix: jury BUT / UE si pas de résultat, tableau bord module si absence de poids.

This commit is contained in:
Emmanuel Viennet 2022-12-16 23:33:04 -03:00 committed by iziram
parent f1fd4d98d7
commit 0d9338dc0a
3 changed files with 8 additions and 6 deletions

View File

@ -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 ?

View File

@ -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' :

View File

@ -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 = (
"""<div class="evaluation_poids">"""
+ "\n".join(