From 0e42df55c927bde01949984d4c20a741db03e834 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Tue, 22 Feb 2022 18:44:53 +0100 Subject: [PATCH] =?UTF-8?q?Option=20pour=20afficher=20coef.=20UE=20s=C3=A9?= =?UTF-8?q?par=C3=A9e=20de=20celle=20pour=20les=20coefs=20modules=20(et=20?= =?UTF-8?q?=C3=A9vals).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/scodoc/sco_bulletins_standard.py | 10 ++++++---- app/scodoc/sco_preferences.py | 12 +++++++++++- 2 files changed, 17 insertions(+), 5 deletions(-) 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_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"],