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 @@