From 1847250bab3fc5d59297a1249205c17b24f41676 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Thu, 6 Oct 2022 00:19:54 +0200 Subject: [PATCH] =?UTF-8?q?Remplissage=20des=20notes=20des=20=C3=A9tudiant?= =?UTF-8?q?s=20inscrits=20en=20cours=20de=20route:=20am=C3=A9liore=20d?= =?UTF-8?q?=C3=A9tection=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/scodoc/sco_formsemestre_status.py | 18 +++++++++++------- sco_version.py | 2 +- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/app/scodoc/sco_formsemestre_status.py b/app/scodoc/sco_formsemestre_status.py index 24f3d6e1d..0fe380fa1 100644 --- a/app/scodoc/sco_formsemestre_status.py +++ b/app/scodoc/sco_formsemestre_status.py @@ -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()) diff --git a/sco_version.py b/sco_version.py index 0d42bc892..36ccc205c 100644 --- a/sco_version.py +++ b/sco_version.py @@ -1,7 +1,7 @@ # -*- mode: python -*- # -*- coding: utf-8 -*- -SCOVERSION = "9.3.54" +SCOVERSION = "9.3.55" SCONAME = "ScoDoc"