BUT: édition des coefs: UE et mod de tronc commun

This commit is contained in:
Emmanuel Viennet 2022-10-31 09:46:30 +01:00
parent 926633cde3
commit d5f1525ac6
1 changed files with 8 additions and 2 deletions

View File

@ -86,9 +86,15 @@ def table_modules_ue_coefs(formation_id, semestre_idx=None, parcours_id: int = N
df, ues, modules = moy_ue.df_load_module_coefs(formation_id, semestre_idx)
# Filtrage par parcours
if parcour is not None:
ues = [ue for ue in ues if parcours_id == ue.parcour_id]
ues = [
ue
for ue in ues
if (parcours_id == ue.parcour_id) or (ue.parcour_id is None)
]
modules = [
mod for mod in modules if parcours_id in (p.id for p in mod.parcours)
mod
for mod in modules
if (parcours_id in (p.id for p in mod.parcours)) or (mod.parcours is None)
]
# Titre des modules, en ligne
col_titres_mods = [