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.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
|
||||
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"
|
||||
:returns: dict, "", "json"
|
||||
"""
|
||||
formsemestre = FormSemestre.query.get_or_404(formsemestre_id)
|
||||
is_apc = formsemestre.formation.is_apc()
|
||||
|
||||
if xml_nodate:
|
||||
docdate = ""
|
||||
else:
|
||||
@ -958,14 +962,18 @@ def _formsemestre_recapcomplet_json(
|
||||
T = nt.get_table_moyennes_triees()
|
||||
for t in T:
|
||||
etudid = t[-1]
|
||||
bulletins.append(
|
||||
sco_bulletins_json.formsemestre_bulletinetud_published_dict(
|
||||
if is_apc:
|
||||
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,
|
||||
etudid,
|
||||
force_publishing=force_publishing,
|
||||
xml_with_decisions=xml_with_decisions,
|
||||
)
|
||||
)
|
||||
bulletins.append(bul)
|
||||
return J, "", "json"
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user