forked from ScoDoc/DocScoDoc
Fiche étudiant: utilise res_sem, affiche moyennes BUT
This commit is contained in:
parent
a780b1e78a
commit
a8367a84fb
@ -228,6 +228,7 @@ class BulletinBUT(ResultatsSemestreBUT):
|
||||
"date_fin": formsemestre.date_fin.isoformat(),
|
||||
"annee_universitaire": self.formsemestre.annee_scolaire_str(),
|
||||
"numero": formsemestre.semestre_id,
|
||||
"inscription": "", # inutilisé mais nécessaire pour le js de Seb.
|
||||
"groupes": [], # XXX TODO
|
||||
"absences": {
|
||||
"injustifie": nbabsjust,
|
||||
|
@ -21,7 +21,7 @@ class StatsMoyenne:
|
||||
Les valeurs NAN ou non numériques sont toujours enlevées.
|
||||
Si vals is None, renvoie des zéros (utilisé pour UE bonus)
|
||||
"""
|
||||
if vals is None:
|
||||
if vals is None or len(vals) == 0:
|
||||
self.moy = self.min = self.max = self.size = self.nb_vals = 0
|
||||
else:
|
||||
self.moy = np.nanmean(vals)
|
||||
|
@ -293,10 +293,11 @@ class NotesTableCompat(ResultatsSemestre):
|
||||
def get_etud_ue_status(self, etudid: int, ue_id: int):
|
||||
coef_ue = self.etud_coef_ue_df[ue_id][etudid]
|
||||
return {
|
||||
"is_capitalized": False, # XXX TODO
|
||||
"is_external": False, # XXX TODO
|
||||
"coef_ue": coef_ue, # XXX TODO
|
||||
"cur_moy_ue": self.etud_moy_ue[ue_id][etudid],
|
||||
"moy": self.etud_moy_ue[ue_id][etudid],
|
||||
"is_capitalized": False, # XXX TODO
|
||||
"coef_ue": coef_ue, # XXX TODO
|
||||
}
|
||||
|
||||
def get_etud_rang(self, etudid: int):
|
||||
|
@ -31,15 +31,21 @@ import time
|
||||
|
||||
import flask
|
||||
from flask import url_for, g, request
|
||||
from app.api.sco_api import formsemestre
|
||||
|
||||
import app.scodoc.notesdb as ndb
|
||||
import app.scodoc.sco_utils as scu
|
||||
from app import log
|
||||
from app.scodoc.scolog import logdb
|
||||
from app.scodoc.TrivialFormulator import TrivialFormulator, tf_error_message
|
||||
from app.scodoc.sco_exceptions import ScoValueError
|
||||
|
||||
from app.comp import res_sem
|
||||
from app.comp.res_common import NotesTableCompat
|
||||
from app.models import FormSemestre
|
||||
|
||||
from app.scodoc.sco_exceptions import ScoValueError
|
||||
from app.scodoc.scolog import logdb
|
||||
from app.scodoc.sco_codes_parcours import *
|
||||
from app.scodoc.TrivialFormulator import TrivialFormulator, tf_error_message
|
||||
|
||||
from app.scodoc import html_sco_header
|
||||
from app.scodoc import sco_abs
|
||||
from app.scodoc import sco_codes_parcours
|
||||
@ -542,9 +548,9 @@ def formsemestre_recap_parcours_table(
|
||||
else:
|
||||
ass = ""
|
||||
|
||||
nt = sco_cache.NotesTableCache.get(
|
||||
sem["formsemestre_id"]
|
||||
) # > get_ues_stat_dict, get_etud_moy_gen, get_etud_ue_status
|
||||
formsemestre = FormSemestre.query.get(sem["formsemestre_id"])
|
||||
nt: NotesTableCompat = res_sem.load_formsemestre_result(formsemestre)
|
||||
# nt = sco_cache.NotesTableCache.get(sem["formsemestre_id"])
|
||||
if is_cur:
|
||||
type_sem = "*" # now unused
|
||||
class_sem = "sem_courant"
|
||||
|
Loading…
Reference in New Issue
Block a user