Améliore affichage UE capitalisées BUT en PDF

This commit is contained in:
Emmanuel Viennet 2023-03-19 11:06:46 +01:00
parent 32c321bcd1
commit 3f26af4ed6
2 changed files with 13 additions and 7 deletions

View File

@ -159,12 +159,16 @@ class BulletinGeneratorStandardBUT(BulletinGeneratorStandard):
blue,
),
]
ues = self.infos["ues"]
ues_capitalisees = self.infos.get("ues_capitalisees", {})
for ue_acronym, ue in self.infos["ues"].items():
self._ue_rows(rows, ue_acronym, ue, title_bg)
if ue_acronym in ues_capitalisees:
ues_tup = sorted(
list(ues.items()) + list(ues_capitalisees.items()),
key=lambda x: x[1]["numero"],
)
for ue_acronym, ue in ues_tup:
is_capitalized = "date_capitalisation" in ue
self._ue_rows(
rows, ue_acronym, ues_capitalisees[ue_acronym], title_ue_cap_bg
rows, ue_acronym, ue, title_ue_cap_bg if is_capitalized else title_bg
)
# Global pdf style commands:

View File

@ -1364,6 +1364,7 @@ class BasePreferences(object):
{
"initvalue": 0,
"title": "Afficher détail des notes des UE capitalisées sur les bulletins ",
"explanation": "ne concerne pas les bulletins BUT",
"input_type": "boolcheckbox",
"category": "bul",
"labels": ["non", "oui"],
@ -1374,6 +1375,7 @@ class BasePreferences(object):
{
"initvalue": 1,
"title": "Afficher les UE en cours mais capitalisées sur les bulletins",
"explanation": "ne concerne pas les bulletins BUT",
"input_type": "boolcheckbox",
"category": "bul",
"labels": ["non", "oui"],