diff --git a/app/scodoc/sco_formsemestre_validation.py b/app/scodoc/sco_formsemestre_validation.py index 8a7f36a6..1677e464 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 15c12d53..43362edd 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 b68806d8..e7b5e5fd 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 ce45aad7..7e2c9fcf 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}