From 789449b620a5787e79fa52956bba43e750625d2e Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Fri, 17 Feb 2023 21:22:54 +0100 Subject: [PATCH] =?UTF-8?q?Warning=20sur=20fiche=20=C3=A9tudiant=20BUT=20s?= =?UTF-8?q?i=20pas=20inscrit=20=C3=A0=20un=20parcours?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/scodoc/sco_formsemestre_validation.py | 36 ++++++++++++++++------- app/scodoc/sco_groups.py | 1 - app/static/css/scodoc.css | 5 ++++ app/static/js/scodoc.js | 32 ++++++++++---------- 4 files changed, 48 insertions(+), 26 deletions(-) diff --git a/app/scodoc/sco_formsemestre_validation.py b/app/scodoc/sco_formsemestre_validation.py index 8a7f36a66..1677e4645 100644 --- a/app/scodoc/sco_formsemestre_validation.py +++ b/app/scodoc/sco_formsemestre_validation.py @@ -536,20 +536,27 @@ def formsemestre_recap_parcours_table( else: sd = " recap_hide_details" plusminus = pluslink - H.append('' % sd) H.append( - '' - % scu.icontag("plus18_img", width=18, height=18, border=0, title="", alt="+") + f"""
%sSemestre
+ + + + + + + """ ) - H.append("") # titres des UE H.append("" * Se.nb_max_ue) # if with_links: H.append("") H.append("") - num_sem = 0 + num_sem = 0 for sem in Se.get_semestres(): is_prev = Se.prev and (Se.prev["formsemestre_id"] == sem["formsemestre_id"]) is_cur = Se.formsemestre_id == sem["formsemestre_id"] @@ -591,11 +598,20 @@ def formsemestre_recap_parcours_table( pm = plusminus % sem["formsemestre_id"] inscr = formsemestre.etuds_inscriptions.get(etudid) - parcours_name = ( - f' {inscr.parcour.code}' - if (inscr and inscr.parcour) - else "" - ) + parcours_name = "" + if inscr and nt.is_apc: + if inscr.parcour: + parcours_name = ( + f' {inscr.parcour.code}' + ) + else: + # si l'étudiant n'est pas inscrit à un parcours mais que le semestre a plus d'UE + # signale un éventuel problème: + if nt.formsemestre.query_ues().count() > len(nt.etud_ues_ids(etudid)): + parcours_name = f""" + {scu.EMO_WARNING} pas de parcours + """ + H.append( f""" diff --git a/app/scodoc/sco_groups.py b/app/scodoc/sco_groups.py index 15c12d532..43362edd7 100644 --- a/app/scodoc/sco_groups.py +++ b/app/scodoc/sco_groups.py @@ -667,7 +667,6 @@ def change_etud_group_in_partition(etudid: int, group_id: int, partition: dict = et le desinscrit d'autres groupes de cette partition. """ log("change_etud_group_in_partition: etudid=%s group_id=%s" % (etudid, group_id)) - # 0- La partition group = get_group(group_id) if partition: diff --git a/app/static/css/scodoc.css b/app/static/css/scodoc.css index b68806d84..e7b5e5fdf 100644 --- a/app/static/css/scodoc.css +++ b/app/static/css/scodoc.css @@ -2471,6 +2471,11 @@ span.code_parcours { border-radius: 2px; } +span.code_parcours.no_parcours { + color: gold; + background-color: firebrick; +} + tr#tf_module_parcours>td { background-color: rgb(229, 229, 229); } diff --git a/app/static/js/scodoc.js b/app/static/js/scodoc.js index ce45aad70..7e2c9fcf3 100644 --- a/app/static/js/scodoc.js +++ b/app/static/js/scodoc.js @@ -105,21 +105,23 @@ function get_query_args() { // Tables (gen_tables) $(function () { - var table_options = { - "paging": false, - "searching": false, - "info": false, - /* "autoWidth" : false, */ - "fixedHeader": { - "header": true, - "footer": true - }, - "orderCellsTop": true, // cellules ligne 1 pour tri - "aaSorting": [], // Prevent initial sorting - }; - $('table.gt_table').DataTable(table_options); - table_options["searching"] = true; - $('table.gt_table_searchable').DataTable(table_options); + if ($('table.gt_table').length > 0) { + var table_options = { + "paging": false, + "searching": false, + "info": false, + /* "autoWidth" : false, */ + "fixedHeader": { + "header": true, + "footer": true + }, + "orderCellsTop": true, // cellules ligne 1 pour tri + "aaSorting": [], // Prevent initial sorting + }; + $('table.gt_table').DataTable(table_options); + table_options["searching"] = true; + $('table.gt_table_searchable').DataTable(table_options); + } });
{ + scu.icontag("plus18_img", width=18, height=18, border=0, title="", alt="+") + }SemestreEtatAbsEtatAbs
{num_sem}{pm}