forked from ScoDoc/DocScoDoc
Export recapcomplet json: format BUT
This commit is contained in:
parent
71615613f1
commit
593317a50a
@ -37,7 +37,8 @@ from flask import make_response
|
|||||||
|
|
||||||
from app import log
|
from app import log
|
||||||
from app.but import bulletin_but
|
from app.but import bulletin_but
|
||||||
from app.models import FormSemestre, UniteEns, Module, ModuleImpl
|
from app.models import FormSemestre
|
||||||
|
from app.models.etudiants import Identite
|
||||||
|
|
||||||
import app.scodoc.sco_utils as scu
|
import app.scodoc.sco_utils as scu
|
||||||
from app.scodoc import html_sco_header
|
from app.scodoc import html_sco_header
|
||||||
@ -937,6 +938,9 @@ def _formsemestre_recapcomplet_json(
|
|||||||
:param force_publishing: donne les bulletins même si non "publiés sur portail"
|
:param force_publishing: donne les bulletins même si non "publiés sur portail"
|
||||||
:returns: dict, "", "json"
|
:returns: dict, "", "json"
|
||||||
"""
|
"""
|
||||||
|
formsemestre = FormSemestre.query.get_or_404(formsemestre_id)
|
||||||
|
is_apc = formsemestre.formation.is_apc()
|
||||||
|
|
||||||
if xml_nodate:
|
if xml_nodate:
|
||||||
docdate = ""
|
docdate = ""
|
||||||
else:
|
else:
|
||||||
@ -958,14 +962,18 @@ def _formsemestre_recapcomplet_json(
|
|||||||
T = nt.get_table_moyennes_triees()
|
T = nt.get_table_moyennes_triees()
|
||||||
for t in T:
|
for t in T:
|
||||||
etudid = t[-1]
|
etudid = t[-1]
|
||||||
bulletins.append(
|
if is_apc:
|
||||||
sco_bulletins_json.formsemestre_bulletinetud_published_dict(
|
etud = Identite.query.get(etudid)
|
||||||
|
r = bulletin_but.ResultatsSemestreBUT(formsemestre)
|
||||||
|
bul = r.bulletin_etud(etud, formsemestre)
|
||||||
|
else:
|
||||||
|
bul = sco_bulletins_json.formsemestre_bulletinetud_published_dict(
|
||||||
formsemestre_id,
|
formsemestre_id,
|
||||||
etudid,
|
etudid,
|
||||||
force_publishing=force_publishing,
|
force_publishing=force_publishing,
|
||||||
xml_with_decisions=xml_with_decisions,
|
xml_with_decisions=xml_with_decisions,
|
||||||
)
|
)
|
||||||
)
|
bulletins.append(bul)
|
||||||
return J, "", "json"
|
return J, "", "json"
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user