forked from ScoDoc/DocScoDoc
TESTS: scenario standard capitalisation
This commit is contained in:
parent
62a813494c
commit
e7ccdee992
78
scotests/test_capitalisation.py
Normal file
78
scotests/test_capitalisation.py
Normal file
@ -0,0 +1,78 @@
|
||||
# -*- mode: python -*-
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""Test jury et capitalisation
|
||||
|
||||
Création 10 étudiants, puis formation en 4 semestre.
|
||||
Le premier étudiant redouble sa deuxième année.
|
||||
|
||||
Utiliser comme:
|
||||
scotests/scointeractive.sh -r TEST00 scotests/test_capitalisation.py
|
||||
|
||||
"""
|
||||
|
||||
import scotests.sco_fake_gen as sco_fake_gen # pylint: disable=import-error
|
||||
import sco_utils
|
||||
import sco_codes_parcours
|
||||
|
||||
G = sco_fake_gen.ScoFake(context.Notes) # pylint: disable=undefined-variable
|
||||
G.verbose = False
|
||||
|
||||
# --- Création d'étudiants
|
||||
etuds = [G.create_etud(code_nip=None) for _ in range(10)]
|
||||
|
||||
# --- Mise en place formation 4 semestre
|
||||
f, ue_list, mod_list = G.setup_formation(nb_semestre=4)
|
||||
|
||||
# --- Crée les 4 semestre et affecte des notes aléatoires
|
||||
sems, evals = [], []
|
||||
for semestre_id, date_debut, date_fin in [
|
||||
(1, "01/09/2019", "15/01/2020"),
|
||||
(2, "16/01/2020", "30/06/2020"),
|
||||
(3, "01/09/2020", "15/01/2021"),
|
||||
(4, "16/01/2021", "30/06/2021"),
|
||||
]:
|
||||
sem, eval_list = G.setup_formsemestre(
|
||||
f, mod_list, semestre_id=semestre_id, date_debut=date_debut, date_fin=date_fin
|
||||
)
|
||||
sems.append(sem)
|
||||
evals.append(eval_list) # liste des listes d'evaluations
|
||||
for etud in etuds:
|
||||
G.inscrit_etudiant(sem, etud)
|
||||
G.set_etud_notes_sem(sem, eval_list, etuds)
|
||||
|
||||
|
||||
def evals_premiere_ue(eval_list):
|
||||
return
|
||||
|
||||
|
||||
# Le premier étudiant va redoubler sa deuxième année
|
||||
# on crée 2 semestres supplémentaires auxquels on n'inscrit que lui
|
||||
# puis on ajuste ses notes de S3, S4 et S3bis, S4bis
|
||||
etud = etuds[0] # l'étudiant redoublant
|
||||
for semestre_id, date_debut, date_fin in [
|
||||
(3, "01/09/2022", "15/01/2023"),
|
||||
(4, "16/01/2023", "30/06/2023"),
|
||||
]:
|
||||
sem, eval_list = G.setup_formsemestre(
|
||||
f, mod_list, semestre_id=semestre_id, date_debut=date_debut, date_fin=date_fin
|
||||
)
|
||||
sems.append(sem)
|
||||
evals.append(eval_list) # liste des listes d'evaluations
|
||||
G.inscrit_etudiant(sem, etud)
|
||||
|
||||
# Donne 11.5 aux evals UE1 de son premier S3:
|
||||
G.set_etud_notes_sem(sems[3 - 1], evals[3 - 1][:2], [etud], [11.5])
|
||||
# et 8 aux evals de l'UE2:
|
||||
G.set_etud_notes_sem(sems[3 - 1], evals[3 - 1][2:], [etud], [8.0])
|
||||
|
||||
# et 9 en UE1 de son second S3:
|
||||
# G.set_etud_notes_sem(sems[5 - 1], evals[5 - 1][:2], [etud], [9.0])
|
||||
# et 12 en U2 de son second S3:
|
||||
G.set_etud_notes_sem(sems[5 - 1], evals[5 - 1][2:], [etud], [12.0])
|
||||
|
||||
# Jury: S1/ADM, S2/ADJ, S3/AJ, S4/AJ
|
||||
G.set_code_jury(sems[0], etud, code_etat=sco_codes_parcours.ADM)
|
||||
G.set_code_jury(sems[1], etud, code_etat=sco_codes_parcours.ADJ)
|
||||
G.set_code_jury(sems[2], etud, code_etat=sco_codes_parcours.AJ)
|
||||
G.set_code_jury(sems[3], etud, code_etat=sco_codes_parcours.AJ)
|
Loading…
Reference in New Issue
Block a user