1
0
forked from ScoDoc/ScoDoc

Fix (bul BUT)

This commit is contained in:
Emmanuel Viennet 2022-02-10 14:34:16 +01:00
parent 78e97a43e4
commit 38d7f31408
5 changed files with 10 additions and 10 deletions

View File

@ -123,7 +123,8 @@ class BulletinBUT:
# np.nanmean(self.sem_cube[:, mod_idx, :], axis=1), # np.nanmean(self.sem_cube[:, mod_idx, :], axis=1),
# copy=False, # copy=False,
# ) # )
# except RuntimeWarning: # all nans in np.nanmean (sur certains etuds sans notes valides) # except RuntimeWarning:
# # all nans in np.nanmean (sur certains etuds sans notes valides)
# pass # pass
# try: # try:
# moy_indicative_mod = np.nanmean(self.sem_cube[etud_idx, mod_idx]) # moy_indicative_mod = np.nanmean(self.sem_cube[etud_idx, mod_idx])
@ -141,7 +142,8 @@ class BulletinBUT:
moduleimpl_id=modimpl.id, moduleimpl_id=modimpl.id,
), ),
"moyenne": { "moyenne": {
# # moyenne indicative de module: moyenne des UE, ignorant celles sans notes (nan) # # moyenne indicative de module: moyenne des UE,
# # ignorant celles sans notes (nan)
# "value": fmt_note(moy_indicative_mod), # "value": fmt_note(moy_indicative_mod),
# "min": fmt_note(moyennes_etuds.min()), # "min": fmt_note(moyennes_etuds.min()),
# "max": fmt_note(moyennes_etuds.max()), # "max": fmt_note(moyennes_etuds.max()),
@ -216,7 +218,7 @@ class BulletinBUT:
""" """
res = self.res res = self.res
etat_inscription = etud.etat_inscription(formsemestre.id) etat_inscription = etud.etat_inscription(formsemestre.id)
nb_inscrits = self.get_inscriptions_counts()[scu.INSCRIT] nb_inscrits = self.res.get_inscriptions_counts()[scu.INSCRIT]
published = (not formsemestre.bul_hide_xml) or force_publishing published = (not formsemestre.bul_hide_xml) or force_publishing
d = { d = {
"version": "0", "version": "0",
@ -276,7 +278,7 @@ class BulletinBUT:
"ues": { "ues": {
ue.acronyme: self.etud_ue_results(etud, ue) ue.acronyme: self.etud_ue_results(etud, ue)
for ue in res.ues for ue in res.ues
if self.modimpls_in_ue( if self.res.modimpls_in_ue(
ue.id, etud.id ue.id, etud.id
) # si l'UE comporte des modules auxquels on est inscrit ) # si l'UE comporte des modules auxquels on est inscrit
}, },

View File

@ -9,8 +9,6 @@ from functools import cached_property
import numpy as np import numpy as np
import pandas as pd import pandas as pd
from flask import g
from app.comp.aux_stats import StatsMoyenne from app.comp.aux_stats import StatsMoyenne
from app.comp import moy_sem from app.comp import moy_sem
from app.comp.res_cache import ResultatsCache from app.comp.res_cache import ResultatsCache

View File

@ -410,7 +410,7 @@ class NotesTable:
return "" return ""
def get_etud_etat_html(self, etudid): def get_etud_etat_html(self, etudid):
etat = self.inscrdict[etudid]["etat"]
if etat == "I": if etat == "I":
return "" return ""
elif etat == "D": elif etat == "D":
@ -1169,7 +1169,7 @@ class NotesTable:
and moy_ue_cap >= self.parcours.NOTES_BARRE_VALID_UE and moy_ue_cap >= self.parcours.NOTES_BARRE_VALID_UE
): ):
if not cnx: if not cnx:
cnx = ndb.GetDBConnexion(autocommit=False) cnx = ndb.GetDBConnexion()
sco_parcours_dut.do_formsemestre_validate_ue( sco_parcours_dut.do_formsemestre_validate_ue(
cnx, cnx,
nt_cap, nt_cap,

View File

@ -495,7 +495,7 @@ def make_formsemestre_recapcomplet(
j += 1 j += 1
if not hidebac: if not hidebac:
for k in admission_extra_cols: for k in admission_extra_cols:
l.append(getattr(e["admission"], k, "")) l.append(getattr(e["admission"], k, "") or "")
l.append( l.append(
nt.identdict[etudid]["code_nip"] or "" nt.identdict[etudid]["code_nip"] or ""
) # avant-derniere colonne = code_nip ) # avant-derniere colonne = code_nip

View File

@ -133,7 +133,7 @@ from app.scodoc.TrivialFormulator import TrivialFormulator
from app.views import ScoData from app.views import ScoData
def sco_publish(route, function, permission, methods=["GET"]): def sco_publish(route, function, permission, methods=("GET",)):
"""Declare a route for a python function, """Declare a route for a python function,
protected by permission and called following ScoDoc 7 Zope standards. protected by permission and called following ScoDoc 7 Zope standards.
""" """