diff --git a/app/comp/res_common.py b/app/comp/res_common.py
index 5f652ec5c..f13201262 100644
--- a/app/comp/res_common.py
+++ b/app/comp/res_common.py
@@ -518,11 +518,15 @@ class NotesTableCompat(ResultatsSemestre):
return ""
return ins.etat
- def get_etud_mat_moy(self, matiere_id, etudid):
+ def get_etud_mat_moy(self, matiere_id: int, etudid: int) -> str:
"""moyenne d'un étudiant dans une matière (ou NA si pas de notes)"""
if not self.moyennes_matieres:
return "nd"
- return self.moyennes_matieres[matiere_id][etudid]
+ return (
+ self.moyennes_matieres[matiere_id].get(etudid, "-")
+ if matiere_id in self.moyennes_matieres
+ else "-"
+ )
def get_etud_mod_moy(self, moduleimpl_id: int, etudid: int) -> float:
"""La moyenne de l'étudiant dans le moduleimpl
diff --git a/app/scodoc/sco_bulletins_standard.py b/app/scodoc/sco_bulletins_standard.py
index 60c6f2a00..25111f7e6 100644
--- a/app/scodoc/sco_bulletins_standard.py
+++ b/app/scodoc/sco_bulletins_standard.py
@@ -284,7 +284,7 @@ class BulletinGeneratorStandard(sco_bulletins_generator.BulletinGenerator):
)
with_col_moypromo = prefs["bul_show_moypromo"]
with_col_rang = prefs["bul_show_rangs"]
- with_col_coef = prefs["bul_show_coef"]
+ with_col_coef = prefs["bul_show_coef"] or prefs["bul_show_ue_coef"]
with_col_ects = prefs["bul_show_ects"]
colkeys = ["titre", "module"] # noms des colonnes à afficher
@@ -409,7 +409,7 @@ class BulletinGeneratorStandard(sco_bulletins_generator.BulletinGenerator):
# Chaque UE:
for ue in I["ues"]:
ue_type = None
- coef_ue = ue["coef_ue_txt"]
+ coef_ue = ue["coef_ue_txt"] if prefs["bul_show_ue_coef"] else ""
ue_descr = ue["ue_descr_txt"]
rowstyle = ""
plusminus = minuslink #
@@ -592,7 +592,7 @@ class BulletinGeneratorStandard(sco_bulletins_generator.BulletinGenerator):
"_titre_colspan": 2,
"rang": mod["mod_rang_txt"], # vide si pas option rang
"note": mod["mod_moy_txt"],
- "coef": mod["mod_coef_txt"],
+ "coef": mod["mod_coef_txt"] if prefs["bul_show_coef"] else "",
"abs": mod.get(
"mod_abs_txt", ""
), # absent si pas option show abs module
@@ -656,7 +656,9 @@ class BulletinGeneratorStandard(sco_bulletins_generator.BulletinGenerator):
eval_style = ""
t = {
"module": '• ' + e["name"],
- "coef": "" + e["coef_txt"] + "",
+ "coef": ("" + e["coef_txt"] + "")
+ if prefs["bul_show_coef"]
+ else "",
"_hidden": hidden,
"_module_target": e["target_html"],
# '_module_help' : ,
diff --git a/app/scodoc/sco_codes_parcours.py b/app/scodoc/sco_codes_parcours.py
index 59372b8d6..f6ca2ff29 100644
--- a/app/scodoc/sco_codes_parcours.py
+++ b/app/scodoc/sco_codes_parcours.py
@@ -587,7 +587,7 @@ class ParcoursILEPS(TypeParcours):
# SESSION_ABBRV = 'A' # A1, A2, ...
COMPENSATION_UE = False
UNUSED_CODES = set((ADC, ATT, ATB, ATJ))
- ALLOWED_UE_TYPES = [UE_STANDARD, UE_OPTIONNELLE]
+ ALLOWED_UE_TYPES = [UE_STANDARD, UE_OPTIONNELLE, UE_SPORT]
# Barre moy gen. pour validation semestre:
BARRE_MOY = 10.0
# Barre pour UE ILEPS: 8/20 pour UE standards ("fondamentales")
diff --git a/app/scodoc/sco_logos.py b/app/scodoc/sco_logos.py
index c489510b5..46e0c066a 100644
--- a/app/scodoc/sco_logos.py
+++ b/app/scodoc/sco_logos.py
@@ -276,7 +276,7 @@ class Logo:
if self.mm is None:
return f''
else:
- return f''
+ return f''
def last_modified(self):
path = Path(self.filepath)
diff --git a/app/scodoc/sco_preferences.py b/app/scodoc/sco_preferences.py
index b639d5ee4..aab148e70 100644
--- a/app/scodoc/sco_preferences.py
+++ b/app/scodoc/sco_preferences.py
@@ -1296,11 +1296,21 @@ class BasePreferences(object):
"labels": ["non", "oui"],
},
),
+ (
+ "bul_show_ue_coef",
+ {
+ "initvalue": 1,
+ "title": "Afficher coefficient des UE sur les bulletins",
+ "input_type": "boolcheckbox",
+ "category": "bul",
+ "labels": ["non", "oui"],
+ },
+ ),
(
"bul_show_coef",
{
"initvalue": 1,
- "title": "Afficher coefficient des ue/modules sur les bulletins",
+ "title": "Afficher coefficient des modules sur les bulletins",
"input_type": "boolcheckbox",
"category": "bul",
"labels": ["non", "oui"],
diff --git a/app/views/scodoc.py b/app/views/scodoc.py
index 809d8e463..d1c842dd4 100644
--- a/app/views/scodoc.py
+++ b/app/views/scodoc.py
@@ -304,8 +304,9 @@ def _return_logo(name="header", dept_id="", small=False, strict: bool = True):
# stockée dans /opt/scodoc-data/config/logos donc servie manuellement ici
# from app.scodoc.sco_photos import _http_jpeg_file
- logo = sco_logos.find_logo(name, dept_id, strict).select()
+ logo = sco_logos.find_logo(name, dept_id, strict)
if logo is not None:
+ logo.select()
suffix = logo.suffix
if small:
with PILImage.open(logo.filepath) as im:
diff --git a/sco_version.py b/sco_version.py
index 4ac94b210..5c1b87f2e 100644
--- a/sco_version.py
+++ b/sco_version.py
@@ -1,7 +1,7 @@
# -*- mode: python -*-
# -*- coding: utf-8 -*-
-SCOVERSION = "9.1.62"
+SCOVERSION = "9.1.63"
SCONAME = "ScoDoc"