forked from ScoDoc/ScoDoc
Améliore affichage moyenne évaluation sur tableau bord module
This commit is contained in:
parent
668eeb8e3f
commit
6a342245bc
@ -72,16 +72,12 @@ def notes_moyenne_median_mini_maxi(notes):
|
||||
n = len(notes_num)
|
||||
if not n:
|
||||
# Aucune note numérique
|
||||
# si elles sont toutes EXC, renvoie EXC
|
||||
if all(x == scu.NOTES_NEUTRALISE for x in notes):
|
||||
return (
|
||||
scu.NOTES_NEUTRALISE,
|
||||
scu.NOTES_NEUTRALISE,
|
||||
scu.NOTES_NEUTRALISE,
|
||||
scu.NOTES_NEUTRALISE,
|
||||
)
|
||||
# sinon renvoie ABS
|
||||
return None, None, None, None
|
||||
# si elles sont toutes du même type, renvoie ce type (ABS, EXC, ATT)
|
||||
for type_note in (scu.NOTES_NEUTRALISE, scu.NOTES_ATTENTE, None):
|
||||
if all(x == type_note for x in notes):
|
||||
return (type_note, type_note, type_note, type_note)
|
||||
# sinon renvoie "???"
|
||||
return "???", None, None, None
|
||||
moy = sum(notes_num) / n
|
||||
median = list_median(notes_num)
|
||||
mini = min(notes_num)
|
||||
|
@ -801,7 +801,7 @@ def _ligne_evaluation(
|
||||
<td class="rightcell" colspan="2">"""
|
||||
% etat
|
||||
)
|
||||
if etat["moy"]:
|
||||
if etat["nb_notes"]:
|
||||
H.append(
|
||||
f"""<b>{etat["moy"]} / 20</b>
|
||||
(<a class="stdlink" href="{
|
||||
@ -870,7 +870,7 @@ def _ligne_evaluation(
|
||||
f"""<a class="redlink" href="{url_for('notes.saisie_notes',
|
||||
scodoc_dept=g.scodoc_dept, evaluation_id=evaluation.id,
|
||||
**{'group_ids:list': gr_moyenne["group_id"]})
|
||||
}">incomplet</a></font>]"""
|
||||
}">incomplet : terminer saisie</a></font>]"""
|
||||
)
|
||||
else:
|
||||
H.append("""incomplet</font>]""")
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- mode: python -*-
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
SCOVERSION = "9.6.982"
|
||||
SCOVERSION = "9.6.983"
|
||||
|
||||
SCONAME = "ScoDoc"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user