diff --git a/app/api/jury.py b/app/api/jury.py index 4aa31ce0f..190c9aff6 100644 --- a/app/api/jury.py +++ b/app/api/jury.py @@ -54,6 +54,7 @@ from app.scodoc.sco_utils import json_error @as_json def decisions_jury(formsemestre_id: int): """Décisions du jury des étudiants du formsemestre. + (fonction disponible uniquement en BUT actuellement). SAMPLES ------- diff --git a/app/but/jury_but_results.py b/app/but/jury_but_results.py index 2f52e22be..044c96669 100644 --- a/app/but/jury_but_results.py +++ b/app/but/jury_but_results.py @@ -56,16 +56,20 @@ def _get_jury_but_etud_result( rcue_dict = { "ue_1": { "ue_id": rcue.ue_1.id, - "moy": None - if (dec_ue1.moy_ue is None or np.isnan(dec_ue1.moy_ue)) - else dec_ue1.moy_ue, + "moy": ( + None + if (dec_ue1.moy_ue is None or np.isnan(dec_ue1.moy_ue)) + else dec_ue1.moy_ue + ), "code": dec_ue1.code_valide, }, "ue_2": { "ue_id": rcue.ue_2.id, - "moy": None - if (dec_ue2.moy_ue is None or np.isnan(dec_ue2.moy_ue)) - else dec_ue2.moy_ue, + "moy": ( + None + if (dec_ue2.moy_ue is None or np.isnan(dec_ue2.moy_ue)) + else dec_ue2.moy_ue + ), "code": dec_ue2.code_valide, }, "moy": rcue.moy_rcue, @@ -89,6 +93,15 @@ def _get_jury_but_etud_result( row["semestre"] = {"code": dec_etud["decision_sem"].get("code")} else: row["semestre"] = {} # APC, ... + # --- L'année (BUT) + if deca and deca.validation: + row["annee"] = { + "code": deca.validation.code, + "ordre": deca.validation.ordre, + "annee_scolaire": deca.validation.annee_scolaire, + } + else: + row["annee"] = {} # --- Autorisations row["autorisations"] = dec_etud["autorisations"] return row