diff --git a/app/models/modules.py b/app/models/modules.py index e309db1c..c73d82fd 100644 --- a/app/models/modules.py +++ b/app/models/modules.py @@ -6,7 +6,7 @@ from app.models import APO_CODE_STR_LEN from app.models.but_refcomp import ApcParcours, app_critiques_modules, parcours_modules from app.scodoc import sco_utils as scu from app.scodoc.sco_codes_parcours import UE_SPORT -from app.scodoc.sco_utils import ModuleType, abbrev_prenom +from app.scodoc.sco_utils import ModuleType class Module(db.Model): diff --git a/app/scodoc/sco_bulletins_json.py b/app/scodoc/sco_bulletins_json.py index fb0be065..e0cf1044 100644 --- a/app/scodoc/sco_bulletins_json.py +++ b/app/scodoc/sco_bulletins_json.py @@ -250,6 +250,7 @@ def formsemestre_bulletinetud_published_dict( # ects=ects, ects des modules maintenant inutilisés note=dict(value=mod_moy), code_apogee=quote_xml_attr(mod["code_apogee"]), + matiere_id=mod["matiere_id"], ) m["note"].update(modstat) for k in ("min", "max", "moy"): # formatte toutes les notes @@ -344,6 +345,15 @@ def formsemestre_bulletinetud_published_dict( ) ) + # --- Matières: + # for matiere_id in nt.moyennes_matieres: + d["matiere"] = [ + { + "matiere_id": matiere_id, + "note": scu.fmt_note(nt.get_etud_mat_moy(matiere_id, etudid)), + } + for matiere_id in nt.moyennes_matieres + ] # --- Absences if prefs["bul_show_abs"]: nbabs, nbabsjust = sco_abs.get_abs_count(etudid, sem)