Fix: calcul cube sans les démissionnaires.

This commit is contained in:
Emmanuel Viennet 2021-12-15 23:29:18 +01:00
parent 79e2c9476b
commit 1b2573d130
3 changed files with 4 additions and 4 deletions

View File

@ -22,7 +22,7 @@ def df_load_modimpl_inscr(formsemestre) -> pd.DataFrame:
"""
# méthode la moins lente: une requete par module, merge les dataframes
moduleimpl_ids = [m.id for m in formsemestre.modimpls]
etudids = [i.etudid for i in formsemestre.get_inscrits()]
etudids = [i.etudid for i in formsemestre.get_inscrits(include_dem=False)]
df = pd.DataFrame(index=etudids, dtype=int)
for moduleimpl_id in moduleimpl_ids:
ins_df = pd.read_sql_query(
@ -34,7 +34,7 @@ def df_load_modimpl_inscr(formsemestre) -> pd.DataFrame:
index_col="etudid",
dtype=int,
)
df = df.merge(ins_df, how="outer", left_index=True, right_index=True)
df = df.merge(ins_df, how="left", left_index=True, right_index=True)
# les colonnes de df sont en float (Nan) quand il n'y a
# aucun inscrit au module.
df.fillna(0, inplace=True) # les non-inscrits

View File

@ -150,7 +150,7 @@ def df_load_modimpl_notes(moduleimpl_id: int) -> tuple:
# Ce merge met à NULL les élements non présents
# (notes non saisies ou etuds non inscrits au module):
evals_notes = evals_notes.merge(
eval_df, how="outer", left_index=True, right_index=True
eval_df, how="left", left_index=True, right_index=True
)
# Force columns names to integers (evaluation ids)
evals_notes.columns = pd.Int64Index(

View File

@ -1,7 +1,7 @@
# -*- mode: python -*-
# -*- coding: utf-8 -*-
SCOVERSION = "9.1.6"
SCOVERSION = "9.1.7"
SCONAME = "ScoDoc"