From c459e94eb5d0b1f8622e9ef1fe9a38e96536d044 Mon Sep 17 00:00:00 2001
From: Emmanuel Viennet <emmanuel.viennet@gmail.com>
Date: Thu, 6 Feb 2025 15:00:48 +0100
Subject: [PATCH] =?UTF-8?q?Ajout=20appr=C3=A9ciations=20dans=20bulletins?=
 =?UTF-8?q?=20BUT=20json.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 app/but/bulletin_but.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/app/but/bulletin_but.py b/app/but/bulletin_but.py
index cf706008..4c482c6a 100644
--- a/app/but/bulletin_but.py
+++ b/app/but/bulletin_but.py
@@ -16,7 +16,7 @@ from flask import g, has_request_context, url_for
 from app import db
 from app.comp.moy_mod import ModuleImplResults
 from app.comp.res_but import ResultatsSemestreBUT
-from app.models import Evaluation, FormSemestre, Identite, ModuleImpl
+from app.models import BulAppreciations, Evaluation, FormSemestre, Identite, ModuleImpl
 from app.models.groups import GroupDescr
 from app.models.ues import UniteEns
 from app.scodoc import sco_bulletins, sco_utils as scu
@@ -466,6 +466,11 @@ class BulletinBUT:
             semestre_infos.update(
                 sco_bulletins_json.dict_decision_jury(etud, formsemestre)
             )
+        # Ajoute appréciations
+        appreciations = BulAppreciations.get_appreciations_list(
+            formsemestre.id, etud.id
+        )
+        d["appreciation"] = [appr.to_dict() for appr in appreciations]
         if d["etat_inscription"] == scu.INSCRIT:
             # moyenne des moyennes générales du semestre
             semestre_infos["notes"] = {
-- 
GitLab