forked from ScoDoc/ScoDoc
Bul. BUT: SAE dans synthèse, pied de bul. sur meme page.
This commit is contained in:
parent
9587159692
commit
5efebb1336
@ -6,7 +6,7 @@
|
||||
|
||||
"""Génération bulletin BUT au format PDF standard
|
||||
"""
|
||||
|
||||
import itertools
|
||||
from reportlab.platypus import KeepInFrame, Paragraph, Spacer
|
||||
|
||||
from app.scodoc.sco_pdf import blue, cm, mm
|
||||
@ -141,10 +141,11 @@ class BulletinGeneratorStandardBUT(BulletinGeneratorStandard):
|
||||
],
|
||||
}
|
||||
rows.append(t)
|
||||
# Liste chaque ressource
|
||||
for mod_code, mod in ue["ressources"].items():
|
||||
# Liste chaque ressource puis SAE
|
||||
for mod_type in ("ressources", "saes"):
|
||||
for mod_code, mod in ue[mod_type].items():
|
||||
t = {
|
||||
"titre": f"{mod_code} {self.infos['ressources'][mod_code]['titre']}",
|
||||
"titre": f"{mod_code} {self.infos[mod_type][mod_code]['titre']}",
|
||||
"moyenne": mod["moyenne"],
|
||||
"coef": mod["coef"],
|
||||
"_coef_pdf": Paragraph(
|
||||
|
@ -46,10 +46,11 @@ de la forme %(XXX)s sont remplacées par la valeur de XXX, pour XXX dans:
|
||||
Balises img: actuellement interdites.
|
||||
|
||||
"""
|
||||
from reportlab.platypus import KeepTogether, Paragraph, Spacer, Table
|
||||
from reportlab.lib.units import cm, mm
|
||||
from reportlab.lib.colors import Color, blue
|
||||
|
||||
import app.scodoc.sco_utils as scu
|
||||
from app.scodoc.sco_pdf import Color, Paragraph, Spacer, Table
|
||||
from app.scodoc.sco_pdf import blue, cm, mm
|
||||
from app.scodoc.sco_pdf import SU
|
||||
from app.scodoc import sco_preferences
|
||||
from app.scodoc.sco_permissions import Permission
|
||||
@ -195,7 +196,7 @@ class BulletinGeneratorStandard(sco_bulletins_generator.BulletinGenerator):
|
||||
|
||||
# -----
|
||||
if format == "pdf":
|
||||
return Op
|
||||
return [KeepTogether(Op)]
|
||||
elif format == "html":
|
||||
return "\n".join(H)
|
||||
|
||||
|
@ -124,7 +124,7 @@ def get_partition(partition_id):
|
||||
{"partition_id": partition_id},
|
||||
)
|
||||
if not r:
|
||||
raise ValueError("invalid partition_id (%s)" % partition_id)
|
||||
raise ScoValueError(f"Partition inconnue (déjà supprimée ?) ({partition_id})")
|
||||
return r[0]
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user