forked from ScoDoc/ScoDoc
premiers essais pdf bulletin etud sem
This commit is contained in:
parent
76bb83c55a
commit
62e57d9ca0
@ -18,7 +18,7 @@ from app.api.tools import get_last_instance_etud_from_etudid_or_nip_or_ine
|
||||
from app.models import Departement, FormSemestreInscription, FormSemestre, Identite
|
||||
from app.scodoc import sco_bulletins
|
||||
from app.scodoc import sco_groups
|
||||
from app.scodoc.sco_bulletins_pdf import get_etud_bulletins_pdf, get_bulletin_etud_formsemestre
|
||||
from app.scodoc.sco_bulletins_pdf import get_bulletin_etud_formsemestre_pdf
|
||||
from app.scodoc.sco_permissions import Permission
|
||||
|
||||
|
||||
@ -464,7 +464,7 @@ def etudiant_bulletin_semestre( # XXX TODO Ajouter la possibilité de retourner
|
||||
app.set_sco_dept(dept.acronym)
|
||||
|
||||
if pdf:
|
||||
return get_bulletin_etud_formsemestre(etudid, formsemestre_id, version)
|
||||
return get_bulletin_etud_formsemestre_pdf(etudid, formsemestre_id, version)
|
||||
|
||||
|
||||
return sco_bulletins.get_formsemestre_bulletin_etud_json(
|
||||
|
@ -75,7 +75,7 @@ import sco_version
|
||||
|
||||
def assemble_bulletins_pdf(
|
||||
formsemestre_id: int,
|
||||
story: list,
|
||||
story,
|
||||
bul_title: str,
|
||||
infos,
|
||||
pagesbookmarks=None,
|
||||
@ -107,7 +107,7 @@ def assemble_bulletins_pdf(
|
||||
preferences=sco_preferences.SemPreferences(formsemestre_id),
|
||||
)
|
||||
)
|
||||
document.multiBuild(story)
|
||||
document.build(story)
|
||||
data = report.getvalue()
|
||||
return data
|
||||
|
||||
@ -281,19 +281,19 @@ def get_bulletin_etud_formsemestre_pdf(etudid: int, formsemestre_id: int, versio
|
||||
from app.scodoc import sco_bulletins
|
||||
|
||||
etud = sco_etud.get_etud_info(etudid=etudid, filled=True)[0]
|
||||
fragments = []
|
||||
# fragments = []
|
||||
bookmarks = {}
|
||||
filigrannes = {}
|
||||
|
||||
formsemestre = FormSemestre.query.get(formsemestre_id)
|
||||
frag, filigranne = sco_bulletins.do_formsemestre_bulletinetud(
|
||||
fragments, filigranne = sco_bulletins.do_formsemestre_bulletinetud(
|
||||
formsemestre,
|
||||
etudid,
|
||||
format="pdfpart",
|
||||
version=version,
|
||||
)
|
||||
# fragments += frag
|
||||
# filigrannes[i] = filigranne
|
||||
# fragments.append(frag)
|
||||
filigrannes[0] = filigranne
|
||||
# bookmarks[i] = sem["session_id"] # eg RT-DUT-FI-S1-2015
|
||||
|
||||
infos = {"DeptName": sco_preferences.get_preference("DeptName")}
|
||||
@ -304,7 +304,7 @@ def get_bulletin_etud_formsemestre_pdf(etudid: int, formsemestre_id: int, versio
|
||||
try:
|
||||
sco_pdf.PDFLOCK.acquire()
|
||||
pdfdoc = assemble_bulletins_pdf(
|
||||
None,
|
||||
formsemestre_id,
|
||||
fragments,
|
||||
etud["nomprenom"],
|
||||
infos,
|
||||
|
Loading…
Reference in New Issue
Block a user