BUT/parcours: tri sur page visu inscriptions

This commit is contained in:
Emmanuel Viennet 2022-08-31 19:20:40 +02:00
parent d78fb13821
commit f749f6e82d

View File

@ -264,9 +264,7 @@ def moduleimpl_inscriptions_stats(formsemestre_id):
args={"formsemestre_id": formsemestre_id}
)
set_all = set([x["etudid"] for x in inscrits])
partitions, partitions_etud_groups = sco_groups.get_formsemestre_groups(
formsemestre_id
)
partitions, _ = sco_groups.get_formsemestre_groups(formsemestre_id)
can_change = (
authuser.has_permission(Permission.ScoEtudInscrit) and formsemestre.etat
@ -277,7 +275,11 @@ def moduleimpl_inscriptions_stats(formsemestre_id):
options = [] # modules ou seuls quelques etudiants sont inscrits
mod_description = {} # modimplid : str
mod_nb_inscrits = {} # modimplid : int
for modimpl in formsemestre.modimpls_sorted:
if is_apc:
modimpls = sorted(formsemestre.modimpls, key=lambda m: m.module.sort_key_apc())
else:
modimpls = formsemestre.modimpls_sorted
for modimpl in modimpls:
tous_inscrits, nb_inscrits, descr = descr_inscrs_module(
modimpl.id,
set_all,