oups: rectificatif

This commit is contained in:
Emmanuel Viennet 2022-09-26 23:14:34 +02:00
parent 51cc2ca6a5
commit 1a70eb65f1

View File

@ -135,11 +135,6 @@ def but_indicateurs_by_bac(formsemestre: FormSemestre) -> dict[str:dict]:
res: NotesTableCompat = res_sem.load_formsemestre_results(formsemestre) res: NotesTableCompat = res_sem.load_formsemestre_results(formsemestre)
etuds = formsemestre.get_inscrits(include_demdef=True) etuds = formsemestre.get_inscrits(include_demdef=True)
decisions_annee = {
etud.id: jury_but.DecisionsProposeesAnnee(etud, formsemestre)
for etud in etuds
if res.get_etud_etat(etud.id) == scu.INSCRIT
}
# Ventilation par bac # Ventilation par bac
etuds_by_bac = defaultdict(list) # bac : etuds etuds_by_bac = defaultdict(list) # bac : etuds
for etud in etuds: for etud in etuds:
@ -148,9 +143,20 @@ def but_indicateurs_by_bac(formsemestre: FormSemestre) -> dict[str:dict]:
etuds_by_bac[bac].append(etud) etuds_by_bac[bac].append(etud)
indicateurs_by_bac = {} indicateurs_by_bac = {}
for bac in etuds_by_bac: for bac in etuds_by_bac:
decisions_annee = {
etud.id: jury_but.DecisionsProposeesAnnee(etud, formsemestre)
for etud in etuds_by_bac[bac]
if res.get_etud_etat(etud.id) == scu.INSCRIT
}
indicateurs_by_bac[bac] = _indicateurs_enquete_but( indicateurs_by_bac[bac] = _indicateurs_enquete_but(
res, etuds_by_bac[bac], decisions_annee, next_sem_idx res, etuds_by_bac[bac], decisions_annee, next_sem_idx
) )
# refait pour tous
decisions_annee = {
etud.id: jury_but.DecisionsProposeesAnnee(etud, formsemestre)
for etud in etuds
if res.get_etud_etat(etud.id) == scu.INSCRIT
}
indicateurs_by_bac["Total"] = _indicateurs_enquete_but( indicateurs_by_bac["Total"] = _indicateurs_enquete_but(
res, etuds, decisions_annee, next_sem_idx res, etuds, decisions_annee, next_sem_idx
) )