1
0
forked from ScoDoc/ScoDoc
This commit is contained in:
Emmanuel Viennet 2022-03-15 22:24:52 +01:00
parent 7409ccce5a
commit 48d0d89ede

View File

@ -9,6 +9,7 @@
import collections import collections
import datetime import datetime
import numpy as np
from flask import url_for, g from flask import url_for, g
from app.comp.res_but import ResultatsSemestreBUT from app.comp.res_but import ResultatsSemestreBUT
@ -295,20 +296,24 @@ class BulletinBUT:
sco_bulletins_json.dict_decision_jury(etud.id, formsemestre.id) sco_bulletins_json.dict_decision_jury(etud.id, formsemestre.id)
) )
if etat_inscription == scu.INSCRIT: if etat_inscription == scu.INSCRIT:
semestre_infos.update( # moyenne des moyennes générales du semestre
{ semestre_infos["notes"] = {
"notes": { # moyenne des moyennes générales du semestre
"value": fmt_note(res.etud_moy_gen[etud.id]), "value": fmt_note(res.etud_moy_gen[etud.id]),
"min": fmt_note(res.etud_moy_gen.min()), "min": fmt_note(res.etud_moy_gen.min()),
"moy": fmt_note(res.etud_moy_gen.mean()), "moy": fmt_note(res.etud_moy_gen.mean()),
"max": fmt_note(res.etud_moy_gen.max()), "max": fmt_note(res.etud_moy_gen.max()),
}, }
"rang": { # classement wrt moyenne général, indicatif if self.prefs["bul_show_rangs"] and not np.isnan(res.etud_moy_gen[etud.id]):
# classement wrt moyenne général, indicatif
semestre_infos["rang"] = {
"value": res.etud_moy_gen_ranks[etud.id], "value": res.etud_moy_gen_ranks[etud.id],
"total": nb_inscrits, "total": nb_inscrits,
}, }
}, else:
) semestre_infos["rang"] = {
"value": "-",
"total": nb_inscrits,
}
d.update( d.update(
{ {
"ressources": self.etud_mods_results( "ressources": self.etud_mods_results(