This commit is contained in:
Emmanuel Viennet 2021-09-27 17:18:43 +02:00
parent f012fe6fcf
commit c7aba95015
4 changed files with 6 additions and 11 deletions

View File

@ -851,20 +851,18 @@ def ue_sharing_code(ue_code=None, ue_id=None, hide_ue_id=None):
ue_code = ue["ue_code"]
F = sco_formations.formation_list(args={"formation_id": ue["formation_id"]})[0]
formation_code = F["formation_code"]
if ue_id:
# UE du même code, code formation et departement
# UE du même code, code formation et departement:
q_ues = (
NotesUE.query.filter_by(ue_code=ue_code)
.join(NotesUE.formation, aliased=True)
.filter_by(dept_id=F["dept_id"], formation_code=formation_code)
.filter_by(dept_id=g.scodoc_dept_id, formation_code=formation_code)
)
else:
# Toutes les UE du departement avec ce code
# Toutes les UE du departement avec ce code:
q_ues = (
NotesUE.query.filter_by(ue_code=ue_code)
.join(NotesUE.formation, aliased=True)
.filter_by(dept_id=F["dept_id"])
.filter_by(dept_id=g.scodoc_dept_id)
)
if hide_ue_id: # enlève l'ue de depart

View File

@ -97,9 +97,6 @@ def get_formsemestre(formsemestre_id):
"list ONE formsemestre"
if not isinstance(formsemestre_id, int):
raise ValueError()
raise ScoValueError(
"""Semestre invalide, reprenez l'opération au départ ou si le problème persiste signalez l'erreur sur scodoc-devel@listes.univ-paris13.fr"""
)
try:
sem = do_formsemestre_list(args={"formsemestre_id": formsemestre_id})[0]
return sem

View File

@ -291,7 +291,6 @@ def formsemestre_inscr_passage(
etuds = etuds.split(",") # vient du form de confirmation
elif isinstance(etuds, int):
etuds = [etuds]
elif isinstance(etuds, list):
etuds = [int(x) for x in etuds]
auth_etuds_by_sem, inscrits, candidats = list_authorized_etuds_by_sem(sem)
etuds_set = set(etuds)

View File

@ -53,6 +53,7 @@ from flask import url_for, make_response
from config import Config
from app import log
from app.scodoc.sco_vdi import ApoEtapeVDI
from app.scodoc.sco_xml import quote_xml_attr
from app.scodoc.sco_codes_parcours import NOTES_TOLERANCE, CODES_EXPL
from app.scodoc import sco_exceptions
from app.scodoc import sco_xml