diff --git a/app/scodoc/sco_page_etud.py b/app/scodoc/sco_page_etud.py
index 5d40b9d4..c5b21b7b 100644
--- a/app/scodoc/sco_page_etud.py
+++ b/app/scodoc/sco_page_etud.py
@@ -36,7 +36,7 @@ import sqlalchemy as sa
from app import log
from app.auth.models import User
-from app.but import cursus_but
+from app.but import cursus_but, validations_view
from app.models import Adresse, EtudAnnotation, FormSemestre, Identite, ScoDocSiteConfig
from app.scodoc import (
codes_cursus,
@@ -445,6 +445,14 @@ def fiche_etud(etudid=None):
# Liens vers compétences BUT
if last_formsemestre and last_formsemestre.formation.is_apc():
but_cursus = cursus_but.EtudCursusBUT(etud, last_formsemestre.formation)
+ refcomp = last_formsemestre.formation.referentiel_competence
+ if refcomp:
+ ue_validation_by_niveau = validations_view.get_ue_validation_by_niveau(
+ refcomp, etud
+ )
+ ects_total = sum((v.ects() for v in ue_validation_by_niveau.values()))
+ else:
+ ects_total = ""
info[
"but_cursus_mkup"
] = f"""
@@ -454,15 +462,20 @@ def fiche_etud(etudid=None):
cursus=but_cursus,
scu=scu,
)}
-
"""
diff --git a/app/scodoc/sco_vdi.py b/app/scodoc/sco_vdi.py
index 9b8e50fe..09d1a90a 100644
--- a/app/scodoc/sco_vdi.py
+++ b/app/scodoc/sco_vdi.py
@@ -25,12 +25,14 @@
#
##############################################################################
-"""Classe stockant le VDI avec le code étape (noms de fichiers maquettes et code semestres)
+"""Apogée: gestion du VDI avec le code étape (noms de fichiers maquettes et code semestres)
"""
from app.scodoc.sco_exceptions import ScoValueError
class ApoEtapeVDI(object):
+ """Classe stockant le VDI avec le code étape (noms de fichiers maquettes et code semestres)"""
+
_ETAPE_VDI_SEP = "!"
def __init__(self, etape_vdi: str = None, etape: str = "", vdi: str = ""):
@@ -110,7 +112,8 @@ class ApoEtapeVDI(object):
elif len(t) == 2:
etape, vdi = t
else:
- raise ValueError("invalid code etape")
+ # code étape invalide
+ etape, vdi = "", ""
return etape, vdi
else:
return etape_vdi, ""
diff --git a/app/static/css/scodoc.css b/app/static/css/scodoc.css
index 295be36c..78313b24 100644
--- a/app/static/css/scodoc.css
+++ b/app/static/css/scodoc.css
@@ -962,10 +962,18 @@ td.fichetitre2 .fl {
div.section_but {
display: flex;
flex-direction: row;
- align-items: center;
+ align-items: flex-end;
justify-content: space-evenly;
}
-
+div.fiche_but_col2 {
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+}
+div.fiche_total_etcs {
+ font-weight: bold;
+ margin-top: 16px;
+}
div.section_but > div.link_validation_rcues {
align-self: center;
text-align: center;