diff --git a/app/but/validations_view.py b/app/but/validations_view.py index 94ffb2f4..344214a5 100644 --- a/app/but/validations_view.py +++ b/app/but/validations_view.py @@ -47,10 +47,12 @@ def validation_rcues(etud: Identite, formsemestre: FormSemestre, edit: bool = Fa ue_validation_by_niveau = get_ue_validation_by_niveau(refcomp, etud) rcue_validation_by_niveau = get_rcue_validation_by_niveau(refcomp, etud) + ects_total = sum((v.ects() for v in ue_validation_by_niveau.values())) return render_template( "but/validation_rcues.j2", competences_parcour=competences_parcour, edit=edit, + ects_total=ects_total, formation=formation, parcour=parcour, rcue_validation_by_niveau=rcue_validation_by_niveau, diff --git a/app/models/validations.py b/app/models/validations.py index d4ca5bb0..14e7a5b7 100644 --- a/app/models/validations.py +++ b/app/models/validations.py @@ -10,6 +10,7 @@ from app.models import CODE_STR_LEN from app.models.events import Scolog from app.scodoc import sco_cache from app.scodoc import sco_utils as scu +from app.scodoc.codes_cursus import CODES_UE_VALIDES class ScolarFormSemestreValidation(db.Model): @@ -122,6 +123,14 @@ class ScolarFormSemestreValidation(db.Model): le {self.event_date.strftime("%d/%m/%Y")} à {self.event_date.strftime("%Hh%M")} """ + def ects(self) -> float: + "Les ECTS acquis par cette validation. (0 si ce n'est pas une validation d'UE)" + return ( + self.ue.ects + if (self.ue is not None) and (self.code in CODES_UE_VALIDES) + else 0.0 + ) + class ScolarAutorisationInscription(db.Model): """Autorisation d'inscription dans un semestre""" diff --git a/app/static/css/parcour_formation.css b/app/static/css/parcour_formation.css index a08bdac8..72efae4e 100644 --- a/app/static/css/parcour_formation.css +++ b/app/static/css/parcour_formation.css @@ -169,3 +169,11 @@ select.validation_rcue { display: inline-block; margin-left: 32px; } +div.recap_ects, div.link_edit { + margin-left: 16px; + margin-right: 16px; + margin-bottom: 16px; +} +.link_edit a { + padding-right: 48px; +} \ No newline at end of file diff --git a/app/templates/but/validation_rcues.j2 b/app/templates/but/validation_rcues.j2 index ebb55673..4e4f6a82 100644 --- a/app/templates/but/validation_rcues.j2 +++ b/app/templates/but/validation_rcues.j2 @@ -29,6 +29,7 @@ validation.event_date.strftime("%d/%m/%Y à %H:%M") if validation.event_date else "-" }} +
{{"%g"|format(validation.ects())}} ECTS
{% else %} pas de décision de jury enregistrée pour cette UE {% endif %} @@ -83,33 +84,34 @@
{% set validation = rcue_validation_by_niveau.get(niv['niveau'].id) %} - {% if validation %} -
- RCUE enregistré {{validation.code}} - {% if niv['niveau'] and edit %} - {% if not (niv['ue_pair'] and niv['ue_impair']) %} - - {% else %} - - {% endif %} +
+ {% if validation or niv['niveau'] %} + RCUE : {{validation.code if validation else ""}} + {% endif %} + {% if niv['niveau'] and edit %} + {% if not (niv['ue_pair'] and niv['ue_impair']) %} + + {% else %} + {% endif %} -
+ {% endif %} +
+ {% if validation %}
Validation du RCUE
enregistrée le {{ @@ -137,18 +139,27 @@ {% endfor %}
+
+{{"%g"|format(ects_total)}} ECTS validés. +
+ {% if sco.formsemestre.can_edit_jury() %} -
+ {% endif %} @@ -162,7 +173,11 @@ parcours {{parcour.code}} {% else %} tronc commun {% endif %} -du référentiel de compétence {{formation.referentiel_competence.specialite}} +du référentiel de compétence {{formation.referentiel_competence.specialite}} +(version {{formation.referentiel_competence.version_orebut}}).

Seuls les UEs et niveaux de ce référentiel sont montrés. Si le référentiel a diff --git a/sco_version.py b/sco_version.py index f21ff590..82546ebf 100644 --- a/sco_version.py +++ b/sco_version.py @@ -1,7 +1,7 @@ # -*- mode: python -*- # -*- coding: utf-8 -*- -SCOVERSION = "9.5.4" +SCOVERSION = "9.5.5" SCONAME = "ScoDoc"