1
0
forked from ScoDoc/ScoDoc

Fix sur fonctions statistiques

This commit is contained in:
Emmanuel Viennet 2021-08-21 17:37:38 +02:00
parent ae46d29f01
commit 09af326b03
3 changed files with 11 additions and 7 deletions

View File

@ -27,9 +27,10 @@
"""Calculs sur les notes et cache des resultats
"""
import time
import pdb
import inspect
import os
import pdb
import time
from operator import itemgetter
from flask import g, url_for
@ -172,7 +173,7 @@ class NotesTable(object):
"""
def __init__(self, formsemestre_id):
log("NotesTable( formsemestre_id=%s )" % formsemestre_id)
log(f"[pid={os.getpid()}] NotesTable( formsemestre_id={formsemestre_id} )")
if not formsemestre_id:
raise ValueError("invalid formsemestre_id (%s)" % formsemestre_id)
self.formsemestre_id = formsemestre_id
@ -356,7 +357,9 @@ class NotesTable(object):
#
self.compute_moy_moy()
#
log("NotesTable( formsemestre_id=%s ) done." % formsemestre_id)
log(
f"[pid={os.getpid()}] NotesTable( formsemestre_id={formsemestre_id} ) done."
)
def get_etudids(self, sorted=False):
if sorted:

View File

@ -696,6 +696,7 @@ def formsemestre_suivi_cohorte(
REQUEST=None,
):
"""Affiche suivi cohortes par numero de semestre"""
annee_bac = str(annee_bac)
percent = int(percent)
(
tab,
@ -798,7 +799,8 @@ def _gen_form_selectetuds(
bacs.sort()
bacspecialites = list(bacspecialites)
bacspecialites.sort()
annee_bacs = list(annee_bacs)
# on peut avoir un mix de chaines vides et d'entiers:
annee_bacs = [int(x) if x else 0 for x in annee_bacs]
annee_bacs.sort()
civilites = list(civilites)
civilites.sort()
@ -1467,6 +1469,7 @@ def formsemestre_graph_parcours(
REQUEST=None,
):
"""Graphe suivi cohortes"""
annee_bac = str(annee_bac)
# log("formsemestre_graph_parcours")
sem = sco_formsemestre.get_formsemestre(formsemestre_id)
if format == "pdf":

View File

@ -133,7 +133,6 @@ def formsemestre_synchro_etuds(
inscrits_without_key_all,
etudsapo_ident,
) = list_synch(sem, anneeapogee=anneeapogee)
breakpoint()
if export_cat_xls:
filename = export_cat_xls
xls = build_page(
@ -156,7 +155,6 @@ def formsemestre_synchro_etuds(
read_only=read_only,
)
else:
breakpoint()
etuds_set = set(etuds)
a_importer = a_importer.intersection(etuds_set)
a_desinscrire = inscrits_set - etuds_set