Affichage poids évaluations: tri selon UE

This commit is contained in:
Emmanuel Viennet 2022-09-06 23:50:56 +02:00
parent 9ad1e219ca
commit 7fe2d605c3
2 changed files with 4 additions and 2 deletions

View File

@ -123,7 +123,9 @@ class Evaluation(db.Model):
return ", ".join( return ", ".join(
[ [
f"{p.ue.acronyme}: {p.poids}" 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 if evaluation_semestre_idx == p.ue.semestre_idx
] ]
) )

View File

@ -70,7 +70,7 @@ class ModuleImpl(db.Model):
self.module.module_type != scu.ModuleType.RESSOURCE self.module.module_type != scu.ModuleType.RESSOURCE
and self.module.module_type != scu.ModuleType.SAE and self.module.module_type != scu.ModuleType.SAE
): ):
return True return True # Non BUT, toujours conforme
from app.comp import moy_mod from app.comp import moy_mod
return moy_mod.moduleimpl_is_conforme( return moy_mod.moduleimpl_is_conforme(