diff --git a/app/models/groups.py b/app/models/groups.py
index b30d1b4db..1920b3e92 100644
--- a/app/models/groups.py
+++ b/app/models/groups.py
@@ -99,6 +99,15 @@ class Partition(db.Model):
}
return d
+ def get_etud_group(self, etudid: int) -> "GroupDescr":
+ "Le groupe de l'étudiant dans cette partition, ou None si pas présent"
+ return (
+ GroupDescr.query.filter_by(partition_id=self.id)
+ .join(group_membership)
+ .filter_by(etudid=etudid)
+ .first()
+ )
+
class GroupDescr(db.Model):
"""Description d'un groupe d'une partition"""
diff --git a/app/scodoc/sco_moduleimpl_inscriptions.py b/app/scodoc/sco_moduleimpl_inscriptions.py
index 196051b09..4c593c06d 100644
--- a/app/scodoc/sco_moduleimpl_inscriptions.py
+++ b/app/scodoc/sco_moduleimpl_inscriptions.py
@@ -36,7 +36,13 @@ from flask_login import current_user
from app.comp import res_sem
from app.comp.res_compat import NotesTableCompat
-from app.models import FormSemestre, Identite, ScolarFormSemestreValidation, UniteEns
+from app.models import (
+ FormSemestre,
+ Identite,
+ Partition,
+ ScolarFormSemestreValidation,
+ UniteEns,
+)
from app import log
from app.tables import list_etuds
@@ -517,11 +523,23 @@ def _list_but_ue_inscriptions(res: NotesTableCompat, read_only: bool = True) ->
(UniteEns.query.get(ue_id) for ue_id in ue_ids),
key=lambda u: (u.numero or 0, u.acronyme),
)
- H.append("""
| """)
+ H.append(
+ """
+ """
+
+
---|
L'inscription ou désinscription aux UEs du BUT n'affecte pas les inscriptions aux modules
diff --git a/app/static/css/scodoc.css b/app/static/css/scodoc.css
index d4674f3c2..1129225d7 100644
--- a/app/static/css/scodoc.css
+++ b/app/static/css/scodoc.css
@@ -2066,6 +2066,17 @@ form.list_but_ue_inscriptions td {
text-align: center;
}
+
+table#but_ue_inscriptions {
+ margin-left: 16px;
+ width: auto;
+}
+
+div#but_ue_inscriptions_filter {
+ margin-left: 16px;
+ margin-bottom: 8px;
+}
+
/* Formulaire edition des partitions */
form#editpart table {
border: 1px solid gray;
diff --git a/app/static/js/moduleimpl_inscriptions_stats.js b/app/static/js/moduleimpl_inscriptions_stats.js
index 4686bd852..af8d4bb3c 100644
--- a/app/static/js/moduleimpl_inscriptions_stats.js
+++ b/app/static/js/moduleimpl_inscriptions_stats.js
@@ -14,4 +14,24 @@ function change_ue_inscr(elt) {
sco_message("changement inscription UE enregistré");
}
);
-}
\ No newline at end of file
+}
+
+$(function () {
+ $("table#but_ue_inscriptions").DataTable(
+ {
+ paging: false,
+ searching: true,
+ info: false,
+ autoWidth: false,
+ fixedHeader: {
+ header: true,
+ footer: false
+ },
+ orderCellsTop: true, // cellules ligne 1 pour tri
+ aaSorting: [], // Prevent initial sorting
+ "oLanguage": {
+ "sSearch": "Chercher :"
+ }
+ }
+ );
+});