Bulletin JSON classique: ajoute matières. Closes #535
This commit is contained in:
parent
386471a47f
commit
d48bcfa1d5
@ -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.models.but_refcomp import ApcParcours, app_critiques_modules, parcours_modules
|
||||||
from app.scodoc import sco_utils as scu
|
from app.scodoc import sco_utils as scu
|
||||||
from app.scodoc.sco_codes_parcours import UE_SPORT
|
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):
|
class Module(db.Model):
|
||||||
|
@ -250,6 +250,7 @@ def formsemestre_bulletinetud_published_dict(
|
|||||||
# ects=ects, ects des modules maintenant inutilisés
|
# ects=ects, ects des modules maintenant inutilisés
|
||||||
note=dict(value=mod_moy),
|
note=dict(value=mod_moy),
|
||||||
code_apogee=quote_xml_attr(mod["code_apogee"]),
|
code_apogee=quote_xml_attr(mod["code_apogee"]),
|
||||||
|
matiere_id=mod["matiere_id"],
|
||||||
)
|
)
|
||||||
m["note"].update(modstat)
|
m["note"].update(modstat)
|
||||||
for k in ("min", "max", "moy"): # formatte toutes les notes
|
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
|
# --- Absences
|
||||||
if prefs["bul_show_abs"]:
|
if prefs["bul_show_abs"]:
|
||||||
nbabs, nbabsjust = sco_abs.get_abs_count(etudid, sem)
|
nbabs, nbabsjust = sco_abs.get_abs_count(etudid, sem)
|
||||||
|
Loading…
Reference in New Issue
Block a user