diff --git a/app/but/cursus_but.py b/app/but/cursus_but.py index 8d9a7ba47..6afa8f82e 100644 --- a/app/but/cursus_but.py +++ b/app/but/cursus_but.py @@ -447,11 +447,11 @@ def validations_count_ects(validations: list[ScolarFormSemestreValidation]) -> i doublons (niveaux de compétences validés plusieurs fois)""" ects_dict = {} for v in validations: - key = ( - v.ue.semestre_idx, - v.ue.niveau_competence.id if v.ue.niveau_competence else None, - ) if v.code in CODES_UE_VALIDES: + key = ( + v.ue.semestre_idx, + v.ue.niveau_competence.id if v.ue.niveau_competence else None, + ) ects_dict[key] = v.ue.ects or 0.0 return int(sum(ects_dict.values())) if ects_dict else 0 diff --git a/app/models/etudiants.py b/app/models/etudiants.py index af2207df6..e52e3cf68 100644 --- a/app/models/etudiants.py +++ b/app/models/etudiants.py @@ -216,7 +216,7 @@ class Identite(models.ScoDocModel): except (TypeError, ValueError): if accept_none: return None - abort(404, "etudid invalide") + abort(404, f"etudid invalide {request.url if request else ''}") query = ( cls.query.filter_by(id=etudid, dept_id=g.scodoc_dept_id) diff --git a/app/scodoc/sco_formsemestre_validation.py b/app/scodoc/sco_formsemestre_validation.py index 0050396a4..675abed9e 100644 --- a/app/scodoc/sco_formsemestre_validation.py +++ b/app/scodoc/sco_formsemestre_validation.py @@ -61,6 +61,7 @@ from app.scodoc import sco_cursus_dut from app.scodoc.sco_cursus_dut import etud_est_inscrit_ue from app.scodoc import sco_preferences from app.scodoc import sco_pv_dict +from app.views import ScoData # ------------------------------------------------------------------------------------ @@ -1219,6 +1220,7 @@ def formsemestre_validate_previous_ue(formsemestre: FormSemestre, etud: Identite "min_value": 0, "max_value": 20, "title": "Moyenne (/20) obtenue dans cette UE:", + "explanation": "mettre 10 si non notée", }, ), ( @@ -1249,6 +1251,7 @@ def formsemestre_validate_previous_ue(formsemestre: FormSemestre, etud: Identite cssstyles=["css/jury_delete_manual.css"], etudid=etud.id, formsemestre_id=formsemestre.id, + sco=ScoData(etud=etud, formsemestre=formsemestre), content=f"""