From 995fe1981b8c57a42bade4e1b57b81cf347188ab Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Thu, 23 Jun 2022 15:33:01 +0200 Subject: [PATCH] =?UTF-8?q?Pas=20de=20niveau=20de=20comp=C3=A9tence=20pour?= =?UTF-8?q?=20les=20UE=20bonus?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/but/apc_edit_ue.py | 3 +++ app/templates/pn/form_ues.html | 11 ++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/app/but/apc_edit_ue.py b/app/but/apc_edit_ue.py index b88e43cf7..dd8e60a86 100644 --- a/app/but/apc_edit_ue.py +++ b/app/but/apc_edit_ue.py @@ -11,10 +11,13 @@ from flask import g, url_for from app import db, log from app.models import Formation, UniteEns from app.models.but_refcomp import ApcNiveau +from app.scodoc import sco_codes_parcours def form_ue_choix_niveau(formation: Formation, ue: UniteEns) -> str: """Form. HTML pour associer une UE à un niveau de compétence""" + if ue.type != sco_codes_parcours.UE_STANDARD: + return "" ref_comp = ue.formation.referentiel_competence if ref_comp is None: return f"""
diff --git a/app/templates/pn/form_ues.html b/app/templates/pn/form_ues.html index 836488549..a867bfc95 100644 --- a/app/templates/pn/form_ues.html +++ b/app/templates/pn/form_ues.html @@ -32,8 +32,13 @@ ue.color if ue.color is not none else 'blue'}}"> {{ue.acronyme}} {{ue.titre}} {% set virg = joiner(", ") %} ( @@ -42,7 +47,7 @@ else 'aucun'|safe}} ECTS) - {% if ue.niveau_competence is none %} + {% if (ue.niveau_competence is none) and ue.type == 0 %} pas de compétence associée {% endif %}