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