1
0
forked from ScoDoc/ScoDoc

Ajout infos semestres dans bulletin classique JSON. Close #583

This commit is contained in:
Emmanuel Viennet 2024-03-24 15:47:42 +01:00 committed by Iziram
parent 61f9dddeb6
commit 8df25ca02f
2 changed files with 32 additions and 1 deletions

View File

@ -89,7 +89,7 @@ def formsemestre_bulletinetud_published_dict(
version="long", version="long",
) -> dict: ) -> dict:
"""Dictionnaire representant les informations _publiees_ du bulletin de notes """Dictionnaire representant les informations _publiees_ du bulletin de notes
Utilisé pour JSON, devrait l'être aussi pour XML. (todo) Utilisé pour JSON des formations classiques (mais pas pour le XML, qui est deprecated).
version: version:
short (sans les évaluations) short (sans les évaluations)
@ -169,6 +169,21 @@ def formsemestre_bulletinetud_published_dict(
pid = partition["partition_id"] pid = partition["partition_id"]
partitions_etud_groups[pid] = sco_groups.get_etud_groups_in_partition(pid) partitions_etud_groups[pid] = sco_groups.get_etud_groups_in_partition(pid)
# Il serait préférable de factoriser et d'avoir la même section
# "semestre" que celle des bulletins BUT.
etud_groups = sco_groups.get_etud_formsemestre_groups(
etud, formsemestre, only_to_show=True
)
d["semestre"] = {
"etapes": [str(x.etape_apo) for x in formsemestre.etapes if x.etape_apo],
"date_debut": formsemestre.date_debut.isoformat(),
"date_fin": formsemestre.date_fin.isoformat(),
"annee_universitaire": formsemestre.annee_scolaire_str(),
"numero": formsemestre.semestre_id,
"inscription": "", # inutilisé mais nécessaire pour le js de Seb.
"groupes": [group.to_dict() for group in etud_groups],
}
ues_stat = nt.get_ues_stat_dict() ues_stat = nt.get_ues_stat_dict()
modimpls = nt.get_modimpls_dict() modimpls = nt.get_modimpls_dict()
nbetuds = len(nt.etud_moy_gen_ranks) nbetuds = len(nt.etud_moy_gen_ranks)

View File

@ -50,6 +50,7 @@
"moy_sae_15_3": "~", "moy_sae_15_3": "~",
"bac": "", "bac": "",
"specialite": "", "specialite": "",
"sort_key": "fleury;madeleine",
"type_admission": "", "type_admission": "",
"classement": "", "classement": "",
"partitions": { "partitions": {
@ -107,6 +108,7 @@
"moy_sae_15_3": "~", "moy_sae_15_3": "~",
"bac": "", "bac": "",
"specialite": "", "specialite": "",
"sort_key": "saunier;jacques",
"type_admission": "", "type_admission": "",
"classement": "", "classement": "",
"partitions": { "partitions": {
@ -163,6 +165,7 @@
"moy_sae_14_3": "05.70", "moy_sae_14_3": "05.70",
"moy_sae_15_3": "~", "moy_sae_15_3": "~",
"bac": "", "bac": "",
"sort_key": "lenfant;maxime",
"specialite": "", "specialite": "",
"type_admission": "", "type_admission": "",
"classement": "", "classement": "",
@ -221,6 +224,7 @@
"moy_sae_15_3": "~", "moy_sae_15_3": "~",
"bac": "", "bac": "",
"specialite": "", "specialite": "",
"sort_key": "cuny;camille",
"type_admission": "", "type_admission": "",
"classement": "", "classement": "",
"partitions": { "partitions": {
@ -277,6 +281,7 @@
"moy_sae_14_3": "11.09", "moy_sae_14_3": "11.09",
"moy_sae_15_3": "~", "moy_sae_15_3": "~",
"bac": "", "bac": "",
"sort_key": "mouton;claude",
"specialite": "", "specialite": "",
"type_admission": "", "type_admission": "",
"classement": "", "classement": "",
@ -335,6 +340,7 @@
"moy_sae_15_3": "~", "moy_sae_15_3": "~",
"bac": "", "bac": "",
"specialite": "", "specialite": "",
"sort_key": "regnier;patrick",
"type_admission": "", "type_admission": "",
"classement": "", "classement": "",
"partitions": { "partitions": {
@ -391,6 +397,7 @@
"moy_sae_14_3": "05.17", "moy_sae_14_3": "05.17",
"moy_sae_15_3": "~", "moy_sae_15_3": "~",
"bac": "", "bac": "",
"sort_key": "esteve;alix",
"specialite": "", "specialite": "",
"type_admission": "", "type_admission": "",
"classement": "", "classement": "",
@ -448,6 +455,7 @@
"moy_sae_14_3": "03.32", "moy_sae_14_3": "03.32",
"moy_sae_15_3": "~", "moy_sae_15_3": "~",
"bac": "", "bac": "",
"sort_key": "gilles;maxime",
"specialite": "", "specialite": "",
"type_admission": "", "type_admission": "",
"classement": "", "classement": "",
@ -505,6 +513,7 @@
"moy_sae_14_3": "02.10", "moy_sae_14_3": "02.10",
"moy_sae_15_3": "~", "moy_sae_15_3": "~",
"bac": "", "bac": "",
"sort_key": "naudin;simone",
"specialite": "", "specialite": "",
"type_admission": "", "type_admission": "",
"classement": "", "classement": "",
@ -562,6 +571,7 @@
"moy_sae_14_3": "07.17", "moy_sae_14_3": "07.17",
"moy_sae_15_3": "~", "moy_sae_15_3": "~",
"bac": "", "bac": "",
"sort_key": "costa;sacha",
"specialite": "", "specialite": "",
"type_admission": "", "type_admission": "",
"classement": "", "classement": "",
@ -619,6 +629,7 @@
"moy_sae_14_3": "", "moy_sae_14_3": "",
"moy_sae_15_3": "", "moy_sae_15_3": "",
"bac": "", "bac": "",
"sort_key": "gautier;gerard",
"specialite": "", "specialite": "",
"type_admission": "", "type_admission": "",
"classement": "", "classement": "",
@ -676,6 +687,7 @@
"moy_sae_14_3": "", "moy_sae_14_3": "",
"moy_sae_15_3": "", "moy_sae_15_3": "",
"bac": "", "bac": "",
"sort_key": "villeneuve;francoise",
"specialite": "", "specialite": "",
"type_admission": "", "type_admission": "",
"classement": "", "classement": "",
@ -733,6 +745,7 @@
"moy_sae_14_3": "", "moy_sae_14_3": "",
"moy_sae_15_3": "", "moy_sae_15_3": "",
"bac": "", "bac": "",
"sort_key": "schmitt;emmanuel",
"specialite": "", "specialite": "",
"type_admission": "", "type_admission": "",
"classement": "", "classement": "",
@ -790,6 +803,7 @@
"moy_sae_14_3": "", "moy_sae_14_3": "",
"moy_sae_15_3": "", "moy_sae_15_3": "",
"bac": "", "bac": "",
"sort_key": "boutet;marguerite",
"specialite": "", "specialite": "",
"type_admission": "", "type_admission": "",
"classement": "", "classement": "",
@ -848,6 +862,7 @@
"moy_sae_15_3": "", "moy_sae_15_3": "",
"bac": "", "bac": "",
"specialite": "", "specialite": "",
"sort_key": "rollin;derchen",
"type_admission": "", "type_admission": "",
"classement": "", "classement": "",
"partitions": { "partitions": {
@ -904,6 +919,7 @@
"moy_sae_14_3": "", "moy_sae_14_3": "",
"moy_sae_15_3": "", "moy_sae_15_3": "",
"bac": "", "bac": "",
"sort_key": "diot;camille",
"specialite": "", "specialite": "",
"type_admission": "", "type_admission": "",
"classement": "", "classement": "",