forked from ScoDoc/ScoDoc
Fix regression: validations UE quand semestre validé
This commit is contained in:
parent
8463d368a1
commit
a447c6e5f9
@ -916,7 +916,7 @@ def formsemestre_validate_ues(formsemestre_id, etudid, code_etat_sem, assiduite)
|
||||
and ue_status["moy"] >= nt.parcours.NOTES_BARRE_VALID_UE
|
||||
):
|
||||
code_ue = ADM
|
||||
elif isinstance(ue_status["moy"], float):
|
||||
elif not isinstance(ue_status["moy"], float):
|
||||
# aucune note (pas de moyenne) dans l'UE: ne la valide pas
|
||||
code_ue = None
|
||||
elif valid_semestre:
|
||||
|
@ -27,6 +27,7 @@ from app.scodoc import sco_codes_parcours
|
||||
from app.scodoc import sco_evaluations
|
||||
from app.scodoc import sco_formsemestre_validation
|
||||
from app.scodoc import sco_parcours_dut
|
||||
from app.scodoc import sco_cache
|
||||
from app.scodoc import sco_saisie_notes
|
||||
from app.scodoc import sco_utils as scu
|
||||
|
||||
@ -197,3 +198,19 @@ def run_sco_basic(verbose=False):
|
||||
assert not sco_parcours_dut.formsemestre_has_decisions(
|
||||
sem["formsemestre_id"]
|
||||
), "décisions non effacées"
|
||||
|
||||
# --- Décision de jury et validations des ECTS d'UE
|
||||
for etud in etuds[:5]: # les etudiants notés
|
||||
sco_formsemestre_validation.formsemestre_validation_etud_manu(
|
||||
sem["formsemestre_id"],
|
||||
etud["etudid"],
|
||||
code_etat=sco_codes_parcours.ADJ,
|
||||
assidu=True,
|
||||
redirect=False,
|
||||
)
|
||||
# Vérifie que toutes les UE des étudiants notés ont été acquises:
|
||||
nt = sco_cache.NotesTableCache.get(sem["formsemestre_id"])
|
||||
for etud in etuds[:5]:
|
||||
dec_ues = nt.get_etud_decision_ues(etud["etudid"])
|
||||
for ue_id in dec_ues:
|
||||
assert dec_ues[ue_id]["code"] in {"ADM", "CMP"}
|
||||
|
Loading…
Reference in New Issue
Block a user