From 7fe2d605c33f831e4d7d3eee9004eca3ac055be9 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Tue, 6 Sep 2022 23:50:56 +0200 Subject: [PATCH] =?UTF-8?q?Affichage=20poids=20=C3=A9valuations:=20tri=20s?= =?UTF-8?q?elon=20UE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/evaluations.py | 4 +++- app/models/moduleimpls.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/models/evaluations.py b/app/models/evaluations.py index 5b0960ba02..a77d3f531d 100644 --- a/app/models/evaluations.py +++ b/app/models/evaluations.py @@ -123,7 +123,9 @@ class Evaluation(db.Model): return ", ".join( [ f"{p.ue.acronyme}: {p.poids}" - for p in self.ue_poids + for p in sorted( + self.ue_poids, key=lambda p: (p.ue.numero or 0, p.ue.acronyme) + ) if evaluation_semestre_idx == p.ue.semestre_idx ] ) diff --git a/app/models/moduleimpls.py b/app/models/moduleimpls.py index 13b4f54215..a7aadcbae7 100644 --- a/app/models/moduleimpls.py +++ b/app/models/moduleimpls.py @@ -70,7 +70,7 @@ class ModuleImpl(db.Model): self.module.module_type != scu.ModuleType.RESSOURCE and self.module.module_type != scu.ModuleType.SAE ): - return True + return True # Non BUT, toujours conforme from app.comp import moy_mod return moy_mod.moduleimpl_is_conforme(