From 4a3e37d371ad1a362e389dad5e8fa668c6dd1fe3 Mon Sep 17 00:00:00 2001 From: Jean-Marie Place Date: Thu, 30 Sep 2021 17:11:03 +0200 Subject: [PATCH] ameliioration placement (adapte la taille du select au contenu) --- app/scodoc/sco_placement.py | 3 +-- app/templates/scodoc/forms/placement.html | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/scodoc/sco_placement.py b/app/scodoc/sco_placement.py index ac39c2bba..c2ef9d937 100644 --- a/app/scodoc/sco_placement.py +++ b/app/scodoc/sco_placement.py @@ -88,10 +88,9 @@ def _get_group_info(evaluation_id): groups_tree[partition][group_name] = group_id if partition != TOUS: has_groups = True - nb_groups = len(groups_tree) else: has_groups = False - nb_groups = 1 + nb_groups = sum([len(groups_tree[p]) for p in groups_tree]) return groups_tree, has_groups, nb_groups diff --git a/app/templates/scodoc/forms/placement.html b/app/templates/scodoc/forms/placement.html index 5d2c3c205..7631b743c 100644 --- a/app/templates/scodoc/forms/placement.html +++ b/app/templates/scodoc/forms/placement.html @@ -3,7 +3,7 @@ {% macro render_field(field) %} {{ field.label }} - {{ field()|safe }} + {{ field(**kwargs)|safe }} {% if field.errors %}