forked from ScoDoc/ScoDoc
Bulletin BUT court: affichage des ECTS. Fixes #776
This commit is contained in:
parent
77b66ba5f2
commit
b1ea0080e0
@ -97,6 +97,7 @@ def bulletin_but(formsemestre_id: int, etudid: int = None, fmt="html"):
|
||||
"etud": etud,
|
||||
"formsemestre": formsemestre,
|
||||
"logo": logo,
|
||||
"prefs": bulletins_sem.prefs,
|
||||
"title": f"Bul. {etud.nom_disp()} BUT (court)",
|
||||
"ue_validation_by_niveau": ue_validation_by_niveau,
|
||||
"ues_acronyms": [
|
||||
|
@ -30,6 +30,7 @@ from app.models import (
|
||||
from app.scodoc.sco_bulletins_standard import BulletinGeneratorStandard
|
||||
from app.scodoc.sco_logos import Logo
|
||||
from app.scodoc.sco_pdf import PDFLOCK, SU
|
||||
from app.scodoc.sco_preferences import SemPreferences
|
||||
|
||||
|
||||
def make_bulletin_but_court_pdf(
|
||||
@ -40,6 +41,7 @@ def make_bulletin_but_court_pdf(
|
||||
etud: Identite = None,
|
||||
formsemestre: FormSemestre = None,
|
||||
logo: Logo = None,
|
||||
prefs: SemPreferences = None,
|
||||
title: str = "",
|
||||
ue_validation_by_niveau: dict[tuple[int, str], ScolarFormSemestreValidation] = None,
|
||||
ues_acronyms: list[str] = None,
|
||||
@ -79,6 +81,7 @@ class BulletinGeneratorBUTCourt(BulletinGeneratorStandard):
|
||||
etud: Identite = None,
|
||||
formsemestre: FormSemestre = None,
|
||||
logo: Logo = None,
|
||||
prefs: SemPreferences = None,
|
||||
title: str = "",
|
||||
ue_validation_by_niveau: dict[
|
||||
tuple[int, str], ScolarFormSemestreValidation
|
||||
@ -93,6 +96,7 @@ class BulletinGeneratorBUTCourt(BulletinGeneratorStandard):
|
||||
self.etud = etud
|
||||
self.formsemestre = formsemestre
|
||||
self.logo = logo
|
||||
self.prefs = prefs
|
||||
self.title = title
|
||||
self.ue_validation_by_niveau = ue_validation_by_niveau
|
||||
self.ues_acronyms = ues_acronyms # sans UEs sport
|
||||
@ -274,16 +278,21 @@ class BulletinGeneratorBUTCourt(BulletinGeneratorStandard):
|
||||
f'{bul["ues"][ue]["moyenne"]["rang"]} / {bul["ues"][ue]["moyenne"]["total"]}'
|
||||
for ue in self.ues_acronyms
|
||||
],
|
||||
]
|
||||
if self.prefs["bul_show_ects"]:
|
||||
rows += [
|
||||
["ECTS"]
|
||||
+ [
|
||||
f'{self.decision_ues[ue]["ects"]:g}' if ue in self.decision_ues else ""
|
||||
f'{bul["ues"][ue]["ECTS"]["acquis"]:g} /{bul["ues"][ue]["ECTS"]["total"]:g}'
|
||||
for ue in self.ues_acronyms
|
||||
],
|
||||
]
|
||||
]
|
||||
rows += [
|
||||
["Jury"]
|
||||
+ [
|
||||
self.decision_ues[ue]["code"] if ue in self.decision_ues else ""
|
||||
for ue in self.ues_acronyms
|
||||
],
|
||||
]
|
||||
]
|
||||
blue_bg = Color(183 / 255.0, 235 / 255.0, 255 / 255.0)
|
||||
table_style = [
|
||||
|
@ -91,14 +91,19 @@
|
||||
<td class="col_ue">{{bul.ues[ue].moyenne.rang}} / {{bul.ues[ue].moyenne.total}}</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% if prefs["bul_show_ects"] %}
|
||||
<tr>
|
||||
<td>ECTS</td>
|
||||
{% for ue in ues_acronyms %}
|
||||
<td class="col_ue">{{
|
||||
"%g"|format(decision_ues[ue].ects) if ue in decision_ues else ""
|
||||
}}</td>
|
||||
"%g"|format(bul["ues"][ue]["ECTS"]["acquis"]) if ue in bul["ues"] else ""
|
||||
}} / {{
|
||||
"%g"|format(bul["ues"][ue]["ECTS"]["total"]) if ue in bul["ues"] else ""
|
||||
}}
|
||||
</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endif %}
|
||||
<tr class="jury">
|
||||
<td>Jury</td>
|
||||
{% for ue in ues_acronyms %}
|
||||
|
Loading…
Reference in New Issue
Block a user