From b709b9c2f1c7fe98bbf4f2a449b7188cc34ff6af Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Fri, 17 Dec 2021 14:24:00 +0100 Subject: [PATCH] =?UTF-8?q?Fix:=20ordre=20des=20=C3=A9tudiants?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/comp/moy_mod.py | 1 + app/models/formsemestre.py | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/comp/moy_mod.py b/app/comp/moy_mod.py index 58d6c1958..f71a9e798 100644 --- a/app/comp/moy_mod.py +++ b/app/comp/moy_mod.py @@ -137,6 +137,7 @@ def df_load_modimpl_notes(moduleimpl_id: int) -> tuple: WHERE evaluation_id=%(evaluation_id)s AND n.etudid = i.etudid AND i.moduleimpl_id = %(moduleimpl_id)s + ORDER BY n.etudid """, db.engine, params={ diff --git a/app/models/formsemestre.py b/app/models/formsemestre.py index 105a98eef..3d5ddd304 100644 --- a/app/models/formsemestre.py +++ b/app/models/formsemestre.py @@ -407,7 +407,11 @@ class FormsemestreInscription(db.Model): ) formsemestre = db.relationship( FormSemestre, - backref=db.backref("inscriptions", cascade="all, delete-orphan"), + backref=db.backref( + "inscriptions", + cascade="all, delete-orphan", + order_by="FormsemestreInscription.etudid", + ), ) # I inscrit, D demission en cours de semestre, DEF si "defaillant" etat = db.Column(db.String(CODE_STR_LEN), index=True)