From 844a90ed621def8a3fe0d9195cfc8c7793bdd949 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Sun, 6 Feb 2022 18:40:00 +0100 Subject: [PATCH] =?UTF-8?q?N'exporte=20pas=20les=20rangs=20d'UE=20si=20opt?= =?UTF-8?q?ion=20d=C3=A9sactiv=C3=A9e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/but/bulletin_but.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/but/bulletin_but.py b/app/but/bulletin_but.py index efa900eb0..9a886efff 100644 --- a/app/but/bulletin_but.py +++ b/app/but/bulletin_but.py @@ -77,13 +77,19 @@ class BulletinBUT(ResultatsSemestreBUT): "saes": self.etud_ue_mod_results(etud, ue, self.saes), } if ue.type != UE_SPORT: - rangs, effectif = self.ue_rangs[ue.id] + if sco_preferences.get_preference( + "bul_show_ue_rangs", self.formsemestre.id + ): + rangs, effectif = self.ue_rangs[ue.id] + rang = rangs[etud.id] + else: + rang, effectif = "", 0 d["moyenne"] = { "value": fmt_note(self.etud_moy_ue[ue.id][etud.id]), "min": fmt_note(self.etud_moy_ue[ue.id].min()), "max": fmt_note(self.etud_moy_ue[ue.id].max()), "moy": fmt_note(self.etud_moy_ue[ue.id].mean()), - "rang": rangs[etud.id], + "rang": rang, "total": effectif, # nb etud avec note dans cette UE } else: