From 7c794c01d15f5ab119ba6e525e8c12dc3e563a1e Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Wed, 21 Feb 2024 22:39:12 +0100 Subject: [PATCH] Tableau bord semestre: avertissement modules non conformes --- app/scodoc/sco_formsemestre_status.py | 33 ++++++++++++++++++--------- app/static/css/scodoc.css | 18 ++++++++++++++- 2 files changed, 39 insertions(+), 12 deletions(-) diff --git a/app/scodoc/sco_formsemestre_status.py b/app/scodoc/sco_formsemestre_status.py index c431cb91..8d91bf16 100755 --- a/app/scodoc/sco_formsemestre_status.py +++ b/app/scodoc/sco_formsemestre_status.py @@ -1173,7 +1173,8 @@ def formsemestre_tableau_modules( moduleimpl_id=modimpl.id, ) mod_descr = "Module " + (mod.titre or "") - if mod.is_apc(): + is_apc = mod.is_apc() # SAE ou ressource + if is_apc: coef_descr = ", ".join( [ f"{ue.acronyme}: {co}" @@ -1193,6 +1194,7 @@ def formsemestre_tableau_modules( [u.get_nomcomplet() for u in modimpl.enseignants] ) mod_nb_inscrits = nt.modimpls_results[modimpl.id].nb_inscrits_module + mod_is_conforme = modimpl.check_apc_conformity(nt) ue = modimpl.module.ue if show_ues and (prev_ue_id != ue.id): prev_ue_id = ue.id @@ -1200,10 +1202,12 @@ def formsemestre_tableau_modules( if use_ue_coefs: titre += f""" (coef. {ue.coefficient or 0.0})""" H.append( - f""" - {ue.acronyme} - {titre} - """ + f""" + + {ue.acronyme} + {titre} + + """ ) expr = sco_compute_moy.get_ue_expression( @@ -1226,21 +1230,23 @@ def formsemestre_tableau_modules( fontorange = "" etat = sco_evaluations.do_evaluation_etat_in_mod(nt, modimpl) - # if nt.parcours.APC_SAE: - # tbd style si module non conforme if ( etat["nb_evals_completes"] > 0 and etat["nb_evals_en_cours"] == 0 and etat["nb_evals_vides"] == 0 and not etat["attente"] ): - H.append(f'') + tr_classes = f"formsemestre_status_green{fontorange}" else: - H.append(f'') - + tr_classes = f"formsemestre_status{fontorange}" + if etat["attente"]: + tr_classes += " modimpl_attente" + if not mod_is_conforme: + tr_classes += " modimpl_non_conforme" H.append( f""" - + {mod.code} [en attente]""" ) + if not mod_is_conforme: + H.append( + f""" [non conforme]""" + ) elif mod.module_type == ModuleType.MALUS: nb_malus_notes = sum( e["etat"]["nb_notes"] for e in nt.get_mod_evaluation_etat_list(modimpl) diff --git a/app/static/css/scodoc.css b/app/static/css/scodoc.css index 78313b24..4bfb8186 100644 --- a/app/static/css/scodoc.css +++ b/app/static/css/scodoc.css @@ -1801,11 +1801,27 @@ table.formsemestre_status { tr.formsemestre_status { background-color: rgb(90%, 90%, 90%); } - +table.formsemestre_status tr td:first-child { + padding-left: 4px; +} +table.formsemestre_status tr td:last-child { + padding-right: 8px; +} tr.formsemestre_status_green { background-color: #eff7f2; } +tr.modimpl_non_conforme td { + background-color: #ffc458; +} +tr.modimpl_non_conforme td, tr.modimpl_attente td { + padding-top: 4px; + padding-bottom: 4px; +} +table.formsemestre_status a.redlink { + text-decoration: none; +} + tr.formsemestre_status_ue { background-color: rgb(90%, 90%, 90%); }