From 426865c9c59d9ab3b280446d640fe38bf7a995b4 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Wed, 7 Sep 2022 10:07:46 +0200 Subject: [PATCH] API: export AC modules (fix etat_evals + #486) --- app/models/modules.py | 1 + app/scodoc/sco_formations.py | 4 ++++ sco_version.py | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/models/modules.py b/app/models/modules.py index 5bab526f..ad693069 100644 --- a/app/models/modules.py +++ b/app/models/modules.py @@ -79,6 +79,7 @@ class Module(db.Model): d["ue_coefs"] = [ c.to_dict(convert_objects=convert_objects) for c in self.ue_coefs ] + d["app_critiques"] = {x.code: x.to_dict() for x in self.app_critiques} if not with_matiere: d.pop("matiere", None) if not with_ue: diff --git a/app/scodoc/sco_formations.py b/app/scodoc/sco_formations.py index b060ffe0..cdd8f959 100644 --- a/app/scodoc/sco_formations.py +++ b/app/scodoc/sco_formations.py @@ -150,6 +150,10 @@ def formation_export( mod["parcours"] = [ p.to_dict(with_annees=False) for p in module.parcours ] + # Et les AC + mod["app_critiques"] = { + x.code: x.to_dict() for x in module.app_critiques + } if not export_ids: del mod["id"] del mod["ue_id"] diff --git a/sco_version.py b/sco_version.py index 8a5130f8..92405ec3 100644 --- a/sco_version.py +++ b/sco_version.py @@ -1,7 +1,7 @@ # -*- mode: python -*- # -*- coding: utf-8 -*- -SCOVERSION = "9.3.34" +SCOVERSION = "9.3.35" SCONAME = "ScoDoc"