Fix fiche etud et bulletin BUT en cas de pb de config formation APC. Closes #965

This commit is contained in:
Emmanuel Viennet 2024-07-12 18:40:33 +02:00
parent 2224500209
commit 7dada615e8
3 changed files with 11 additions and 3 deletions

View File

@ -462,7 +462,10 @@ def fiche_etud(etudid=None):
# Liens vers compétences BUT
if last_formsemestre and last_formsemestre.formation.is_apc():
try:
but_cursus = cursus_but.EtudCursusBUT(etud, last_formsemestre.formation)
except ScoValueError:
but_cursus = None
refcomp = last_formsemestre.formation.referentiel_competence
if refcomp:
ue_validation_by_niveau = validations_view.get_ue_validation_by_niveau(
@ -494,7 +497,7 @@ def fiche_etud(etudid=None):
cursus=but_cursus,
scu=scu,
validation_dut120_html=validation_dut120_html,
)}
) if but_cursus else '<span class="pb-config">problème configuration formation BUT</span>'}
<div class="fiche_but_col2">
<div class="link_validation_rcues">
<a class="stdlink" href="{url_for("notes.validation_rcues",

View File

@ -963,6 +963,11 @@ div.section_but {
justify-content: space-evenly;
}
div.section_but .pb-config {
font-style: italic;
color: red;
}
div.fiche_but_col2 {
display: flex;
flex-direction: column;

View File

@ -276,7 +276,7 @@ class releveBUT extends HTMLElement {
${(() => {
let output = "";
data.semestre.decision_rcue.forEach((competence) => {
output += `<div class=competence>${competence.niveau.competence.titre}</div><div>${competence.code}</div>`;
output += `<div class=competence>${competence.niveau?.competence?.titre || '?'}</div><div>${competence.code}</div>`;
});
return output;
})()}