1
0
forked from ScoDoc/ScoDoc

API: export AC modules (fix etat_evals + #486)

This commit is contained in:
Emmanuel Viennet 2022-09-07 10:07:46 +02:00
parent 0f902457f6
commit 426865c9c5
3 changed files with 6 additions and 1 deletions

View File

@ -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:

View File

@ -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"]

View File

@ -1,7 +1,7 @@
# -*- mode: python -*-
# -*- coding: utf-8 -*-
SCOVERSION = "9.3.34"
SCOVERSION = "9.3.35"
SCONAME = "ScoDoc"