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),
# 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
# try:
# moy_indicative_mod = np.nanmean(self.sem_cube[etud_idx, mod_idx])
@ -141,7 +142,8 @@ class BulletinBUT:
moduleimpl_id=modimpl.id,
),
"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),
# "min": fmt_note(moyennes_etuds.min()),
# "max": fmt_note(moyennes_etuds.max()),
@ -216,7 +218,7 @@ class BulletinBUT:
"""
res = self.res
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
d = {
"version": "0",
@ -276,7 +278,7 @@ class BulletinBUT:
"ues": {
ue.acronyme: self.etud_ue_results(etud, ue)
for ue in res.ues
if self.modimpls_in_ue(
if self.res.modimpls_in_ue(
ue.id, etud.id
) # 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 pandas as pd
from flask import g
from app.comp.aux_stats import StatsMoyenne
from app.comp import moy_sem
from app.comp.res_cache import ResultatsCache

View File

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

View File

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

View File

@ -133,7 +133,7 @@ from app.scodoc.TrivialFormulator import TrivialFormulator
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,
protected by permission and called following ScoDoc 7 Zope standards.
"""