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