forked from ScoDoc/DocScoDoc
Affichage table recap BUT si pas de moyenne générale: pas de rangs
This commit is contained in:
parent
adc03bd2c4
commit
6c850d2665
@ -519,10 +519,11 @@ class ResultatsSemestre(ResultatsCache):
|
|||||||
row, "code_nip", "code_nip", etud.code_nip or "", "codes", idx
|
row, "code_nip", "code_nip", etud.code_nip or "", "codes", idx
|
||||||
)
|
)
|
||||||
# --- Rang
|
# --- Rang
|
||||||
idx = add_cell(
|
if not self.formsemestre.block_moyenne_generale:
|
||||||
row, "rang", "Rg", self.etud_moy_gen_ranks[etudid], "rang", idx
|
idx = add_cell(
|
||||||
)
|
row, "rang", "Rg", self.etud_moy_gen_ranks[etudid], "rang", idx
|
||||||
row["_rang_order"] = f"{self.etud_moy_gen_ranks_int[etudid]:05d}"
|
)
|
||||||
|
row["_rang_order"] = f"{self.etud_moy_gen_ranks_int[etudid]:05d}"
|
||||||
# --- Identité étudiant
|
# --- Identité étudiant
|
||||||
idx = add_cell(
|
idx = add_cell(
|
||||||
row, "civilite_str", "Civ.", etud.civilite_str, "identite_detail", idx
|
row, "civilite_str", "Civ.", etud.civilite_str, "identite_detail", idx
|
||||||
@ -548,23 +549,24 @@ class ResultatsSemestre(ResultatsCache):
|
|||||||
|
|
||||||
idx = 30 # début des colonnes de notes
|
idx = 30 # début des colonnes de notes
|
||||||
# --- Moyenne générale
|
# --- Moyenne générale
|
||||||
moy_gen = self.etud_moy_gen.get(etudid, False)
|
if not self.formsemestre.block_moyenne_generale:
|
||||||
note_class = ""
|
moy_gen = self.etud_moy_gen.get(etudid, False)
|
||||||
if moy_gen is False:
|
note_class = ""
|
||||||
moy_gen = NO_NOTE
|
if moy_gen is False:
|
||||||
elif isinstance(moy_gen, float) and moy_gen < barre_moy:
|
moy_gen = NO_NOTE
|
||||||
note_class = " moy_ue_warning" # en rouge
|
elif isinstance(moy_gen, float) and moy_gen < barre_moy:
|
||||||
idx = add_cell(
|
note_class = " moy_ue_warning" # en rouge
|
||||||
row,
|
idx = add_cell(
|
||||||
"moy_gen",
|
row,
|
||||||
"Moy",
|
"moy_gen",
|
||||||
fmt_note(moy_gen),
|
"Moy",
|
||||||
"col_moy_gen" + note_class,
|
fmt_note(moy_gen),
|
||||||
idx,
|
"col_moy_gen" + note_class,
|
||||||
)
|
idx,
|
||||||
titles_bot["_moy_gen_target_attrs"] = (
|
)
|
||||||
'title="moyenne indicative"' if self.is_apc else ""
|
titles_bot["_moy_gen_target_attrs"] = (
|
||||||
)
|
'title="moyenne indicative"' if self.is_apc else ""
|
||||||
|
)
|
||||||
# --- Moyenne d'UE
|
# --- Moyenne d'UE
|
||||||
nb_ues_validables, nb_ues_warning = 0, 0
|
nb_ues_validables, nb_ues_warning = 0, 0
|
||||||
for ue in ues_sans_bonus:
|
for ue in ues_sans_bonus:
|
||||||
@ -733,7 +735,10 @@ class ResultatsSemestre(ResultatsCache):
|
|||||||
self._recap_add_admissions(rows, titles)
|
self._recap_add_admissions(rows, titles)
|
||||||
|
|
||||||
# tri par rang croissant
|
# tri par rang croissant
|
||||||
rows.sort(key=lambda e: e["_rang_order"])
|
if not self.formsemestre.block_moyenne_generale:
|
||||||
|
rows.sort(key=lambda e: e["_rang_order"])
|
||||||
|
else:
|
||||||
|
rows.sort(key=lambda e: e["_ues_validables_order"], reverse=True)
|
||||||
|
|
||||||
# INFOS POUR FOOTER
|
# INFOS POUR FOOTER
|
||||||
bottom_infos = self._recap_bottom_infos(ues_sans_bonus, modimpl_ids, fmt_note)
|
bottom_infos = self._recap_bottom_infos(ues_sans_bonus, modimpl_ids, fmt_note)
|
||||||
|
@ -80,6 +80,7 @@ class FormSemestre(db.Model):
|
|||||||
block_moyenne_generale = db.Column(
|
block_moyenne_generale = db.Column(
|
||||||
db.Boolean(), nullable=False, default=False, server_default="false"
|
db.Boolean(), nullable=False, default=False, server_default="false"
|
||||||
)
|
)
|
||||||
|
"Si vrai, la moyenne générale indicative BUT n'est pas calculée"
|
||||||
# semestres decales (pour gestion jurys):
|
# semestres decales (pour gestion jurys):
|
||||||
gestion_semestrielle = db.Column(
|
gestion_semestrielle = db.Column(
|
||||||
db.Boolean(), nullable=False, default=False, server_default="false"
|
db.Boolean(), nullable=False, default=False, server_default="false"
|
||||||
|
Loading…
Reference in New Issue
Block a user