forked from ScoDoc/ScoDoc
Remplissage des notes des étudiants inscrits en cours de route: améliore détection notes
This commit is contained in:
parent
1ce4ffecad
commit
1847250bab
@ -35,12 +35,12 @@ from flask import g
|
||||
from flask import request
|
||||
from flask import flash, redirect, render_template, url_for
|
||||
from flask_login import current_user
|
||||
import pandas as pd
|
||||
|
||||
from app import log
|
||||
from app.comp import res_sem
|
||||
from app.comp.res_common import ResultatsSemestre
|
||||
from app.comp.res_compat import NotesTableCompat
|
||||
from app.models import Evaluation, Module
|
||||
from app.models import Evaluation, Module, ModuleImpl, NotesNotes
|
||||
from app.models.etudiants import Identite
|
||||
from app.models.formsemestre import FormSemestre
|
||||
import app.scodoc.sco_utils as scu
|
||||
@ -1341,11 +1341,15 @@ def get_formsemestre_etudids_sans_notes(
|
||||
"""Les étudis d'étudiants de ce semestre n'ayant aucune note
|
||||
alors que d'autres en ont.
|
||||
"""
|
||||
# Il y a-t-il des notes prises en compte ?
|
||||
# On regarde la moy. gen., qui pour les étudiants sans notes est NaN en classique
|
||||
# ou nulle en APC.
|
||||
if all(res.etud_moy_gen.eq(0.0, fill_value=0.0)):
|
||||
return set() # tout est 0 ou NaN, empty set
|
||||
# Il y a-t-il des notes déjà saisies ?
|
||||
nb_notes_sem = (
|
||||
NotesNotes.query.join(Evaluation)
|
||||
.join(ModuleImpl)
|
||||
.filter_by(formsemestre_id=formsemestre.id)
|
||||
.count()
|
||||
)
|
||||
if not nb_notes_sem:
|
||||
return
|
||||
etudids_sans_notes = set.intersection(
|
||||
*[
|
||||
set.intersection(*m_res.evals_etudids_sans_note.values())
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- mode: python -*-
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
SCOVERSION = "9.3.54"
|
||||
SCOVERSION = "9.3.55"
|
||||
|
||||
SCONAME = "ScoDoc"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user