WIP: fix rapide pour eviter plante quand démissionnaires
This commit is contained in:
parent
25a441f7f2
commit
79e2c9476b
@ -22,7 +22,7 @@ def df_load_modimpl_inscr(formsemestre) -> pd.DataFrame:
|
|||||||
"""
|
"""
|
||||||
# méthode la moins lente: une requete par module, merge les dataframes
|
# méthode la moins lente: une requete par module, merge les dataframes
|
||||||
moduleimpl_ids = [m.id for m in formsemestre.modimpls]
|
moduleimpl_ids = [m.id for m in formsemestre.modimpls]
|
||||||
etudids = [i.etudid for i in formsemestre.inscriptions]
|
etudids = [i.etudid for i in formsemestre.get_inscrits()]
|
||||||
df = pd.DataFrame(index=etudids, dtype=int)
|
df = pd.DataFrame(index=etudids, dtype=int)
|
||||||
for moduleimpl_id in moduleimpl_ids:
|
for moduleimpl_id in moduleimpl_ids:
|
||||||
ins_df = pd.read_sql_query(
|
ins_df = pd.read_sql_query(
|
||||||
|
@ -980,8 +980,8 @@ class NotesTable:
|
|||||||
def get_table_moyennes_triees(self):
|
def get_table_moyennes_triees(self):
|
||||||
return self.T
|
return self.T
|
||||||
|
|
||||||
def get_etud_rang(self, etudid):
|
def get_etud_rang(self, etudid) -> str:
|
||||||
return self.rangs[etudid]
|
return self.rangs.get(etudid, "999")
|
||||||
|
|
||||||
def get_etud_rang_group(self, etudid, group_id):
|
def get_etud_rang_group(self, etudid, group_id):
|
||||||
"""Returns rank of etud in this group and number of etuds in group.
|
"""Returns rank of etud in this group and number of etuds in group.
|
||||||
@ -1350,6 +1350,7 @@ class NotesTable:
|
|||||||
ues = self.get_ues() # incluant le(s) UE de sport
|
ues = self.get_ues() # incluant le(s) UE de sport
|
||||||
for t in self.T:
|
for t in self.T:
|
||||||
etudid = t[-1]
|
etudid = t[-1]
|
||||||
|
if etudid in results.etud_moy_gen: # evite les démissionnaires
|
||||||
t[0] = results.etud_moy_gen[etudid]
|
t[0] = results.etud_moy_gen[etudid]
|
||||||
for i, ue in enumerate(ues, start=1):
|
for i, ue in enumerate(ues, start=1):
|
||||||
if ue["type"] != UE_SPORT:
|
if ue["type"] != UE_SPORT:
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# -*- mode: python -*-
|
# -*- mode: python -*-
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
SCOVERSION = "9.1.5"
|
SCOVERSION = "9.1.6"
|
||||||
|
|
||||||
SCONAME = "ScoDoc"
|
SCONAME = "ScoDoc"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user