From 45ec03ec115ffa80136e3b969cfbae6c3e4fe2d1 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Wed, 10 Jul 2024 09:47:40 +0200 Subject: [PATCH] =?UTF-8?q?Am=C3=A9liore=20pr=C3=A9sentation=20bilan=20ECT?= =?UTF-8?q?S=20+=20fix=20bug=20but=5Fects=5Fvalides=20si=20pas=20d'ECTS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/but/cursus_but.py | 11 +++++++---- app/static/css/jury_delete_manual.css | 7 ++++++- app/templates/jury/ue_list_etud_validations.j2 | 6 +++++- sco_version.py | 2 +- 4 files changed, 19 insertions(+), 7 deletions(-) diff --git a/app/but/cursus_but.py b/app/but/cursus_but.py index 8ed3fd782..7b5b430ba 100644 --- a/app/but/cursus_but.py +++ b/app/but/cursus_but.py @@ -399,7 +399,7 @@ def but_ects_valides( for v in validations: key = (v.ue.semestre_idx, v.ue.niveau_competence.id) if v.code in CODES_UE_VALIDES: - ects_dict[key] = v.ue.ects + ects_dict[key] = v.ue.ects or 0.0 return int(sum(ects_dict.values())) if ects_dict else 0 @@ -417,15 +417,18 @@ def but_validations_ues( validations = ( ScolarFormSemestreValidation.query.filter_by(etudid=etud.id) .filter(ScolarFormSemestreValidation.ue_id != None) + .join(FormSemestre, ScolarFormSemestreValidation.formsemestre) .join(UniteEns) .join(ApcNiveau) ) # restreint à certaines années (utile pour les ECTS du DUT120) if annees_but: validations = validations.filter(ApcNiveau.annee.in_(annees_but)) - # Et restreint au référentiel de compétence: - return validations.join(ApcCompetence).filter_by( - referentiel_id=referentiel_competence_id + # restreint au référentiel de compétence et trie + return ( + validations.join(ApcCompetence) + .filter_by(referentiel_id=referentiel_competence_id) + .order_by(FormSemestre.semestre_id, UniteEns.numero, UniteEns.acronyme) ) diff --git a/app/static/css/jury_delete_manual.css b/app/static/css/jury_delete_manual.css index 6b0f95b68..3805c619c 100644 --- a/app/static/css/jury_delete_manual.css +++ b/app/static/css/jury_delete_manual.css @@ -13,6 +13,11 @@ div.ue_list_etud_validations ul.liste_validations li { div.ue_list_etud_validations div.total_ects { font-weight: bold; - margin-top: 16px; + margin-top: 24px; margin-bottom: 12px; +} + +div.ue_list_etud_validations ul li.new_semestre, +div.ue_list_etud_validations ul li:first-child { + margin-top: 16px; } \ No newline at end of file diff --git a/app/templates/jury/ue_list_etud_validations.j2 b/app/templates/jury/ue_list_etud_validations.j2 index 4b5343b98..00b4a97ee 100644 --- a/app/templates/jury/ue_list_etud_validations.j2 +++ b/app/templates/jury/ue_list_etud_validations.j2 @@ -8,7 +8,11 @@