forked from ScoDoc/DocScoDoc
Tri PV jury BUT
This commit is contained in:
parent
e8e27dd964
commit
bf8614a386
@ -26,11 +26,15 @@ def _descr_cursus_but(etud: Identite) -> str:
|
||||
# prend simplement tous les semestre de type APC, ce qui sera faux si
|
||||
# l'étudiant change de spécialité au sein du même département
|
||||
# (ce qui ne peut normalement pas se produire)
|
||||
indices = [
|
||||
ins.formsemestre.semestre_id
|
||||
for ins in etud.formsemestre_inscriptions
|
||||
if ins.formsemestre.formation.is_apc()
|
||||
]
|
||||
indices = sorted(
|
||||
[
|
||||
ins.formsemestre.semestre_id
|
||||
if ins.formsemestre.semestre_id is not None
|
||||
else -1
|
||||
for ins in etud.formsemestre_inscriptions
|
||||
if ins.formsemestre.formation.is_apc()
|
||||
]
|
||||
)
|
||||
return ", ".join(f"S{indice}" for indice in indices)
|
||||
|
||||
|
||||
@ -71,6 +75,7 @@ def pvjury_table_but(formsemestre_id: int, format="html") -> list[dict]:
|
||||
deca = None
|
||||
row = {
|
||||
"nom": etud.etat_civil_pv(line_sep=line_sep),
|
||||
"_nom_order": etud.sort_key,
|
||||
"cursus": _descr_cursus_but(etud),
|
||||
"niveaux": deca.descr_niveaux_validation(line_sep=line_sep)
|
||||
if deca
|
||||
@ -81,6 +86,8 @@ def pvjury_table_but(formsemestre_id: int, format="html") -> list[dict]:
|
||||
|
||||
rows.append(row)
|
||||
|
||||
rows.sort(key=lambda x: x["_nom_order"])
|
||||
|
||||
# Style excel... passages à la ligne sur \n
|
||||
xls_style_base = sco_excel.excel_make_style()
|
||||
xls_style_base["alignment"] = Alignment(wrapText=True, vertical="top")
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- mode: python -*-
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
SCOVERSION = "9.3.10"
|
||||
SCOVERSION = "9.3.11"
|
||||
|
||||
SCONAME = "ScoDoc"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user