1
0
forked from ScoDoc/ScoDoc

Remplissage des notes des étudiants inscrits en cours de route: améliore détection notes

This commit is contained in:
Emmanuel Viennet 2022-10-06 00:19:54 +02:00
parent 1ce4ffecad
commit 1847250bab
2 changed files with 12 additions and 8 deletions

View File

@ -35,12 +35,12 @@ from flask import g
from flask import request from flask import request
from flask import flash, redirect, render_template, url_for from flask import flash, redirect, render_template, url_for
from flask_login import current_user from flask_login import current_user
import pandas as pd
from app import log from app import log
from app.comp import res_sem from app.comp import res_sem
from app.comp.res_common import ResultatsSemestre from app.comp.res_common import ResultatsSemestre
from app.comp.res_compat import NotesTableCompat 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.etudiants import Identite
from app.models.formsemestre import FormSemestre from app.models.formsemestre import FormSemestre
import app.scodoc.sco_utils as scu 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 """Les étudis d'étudiants de ce semestre n'ayant aucune note
alors que d'autres en ont. alors que d'autres en ont.
""" """
# Il y a-t-il des notes prises en compte ? # Il y a-t-il des notes déjà saisies ?
# On regarde la moy. gen., qui pour les étudiants sans notes est NaN en classique nb_notes_sem = (
# ou nulle en APC. NotesNotes.query.join(Evaluation)
if all(res.etud_moy_gen.eq(0.0, fill_value=0.0)): .join(ModuleImpl)
return set() # tout est 0 ou NaN, empty set .filter_by(formsemestre_id=formsemestre.id)
.count()
)
if not nb_notes_sem:
return
etudids_sans_notes = set.intersection( etudids_sans_notes = set.intersection(
*[ *[
set.intersection(*m_res.evals_etudids_sans_note.values()) set.intersection(*m_res.evals_etudids_sans_note.values())

View File

@ -1,7 +1,7 @@
# -*- mode: python -*- # -*- mode: python -*-
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
SCOVERSION = "9.3.54" SCOVERSION = "9.3.55"
SCONAME = "ScoDoc" SCONAME = "ScoDoc"