diff --git a/app/models/etudiants.py b/app/models/etudiants.py index a77f272e1f..2511f0ca50 100644 --- a/app/models/etudiants.py +++ b/app/models/etudiants.py @@ -43,6 +43,8 @@ class Identite(db.Model): # Ancien id ScoDoc7 pour les migrations de bases anciennes # ne pas utiliser après migrate_scodoc7_dept_archive scodoc7_id = db.Column(db.Text(), nullable=True) + # + billets = db.relationship("BilletAbsence", backref="etudiant", lazy="dynamic") class Adresse(db.Model): diff --git a/app/scodoc/sco_cache.py b/app/scodoc/sco_cache.py index 50539d88ca..043104ed47 100644 --- a/app/scodoc/sco_cache.py +++ b/app/scodoc/sco_cache.py @@ -157,7 +157,7 @@ class EvaluationCache(ScoDocCache): class AbsSemEtudCache(ScoDocCache): """Cache pour les comptes d'absences d'un étudiant dans un semestre. - Ce cache étant indépendant des semestre, le compte peut être faux lorsqu'on + Ce cache étant indépendant des semestres, le compte peut être faux lorsqu'on change les dates début/fin d'un semestre. C'est pourquoi il expire après timeout secondes. Le timeout evite aussi d'éliminer explicitement ces éléments cachés lors diff --git a/app/scodoc/sco_formsemestre_edit.py b/app/scodoc/sco_formsemestre_edit.py index e8af6247d2..2e238fe57a 100644 --- a/app/scodoc/sco_formsemestre_edit.py +++ b/app/scodoc/sco_formsemestre_edit.py @@ -109,7 +109,7 @@ def formsemestre_editwithmodules(formsemestre_id): H.append(r) else: return r # response redirect - scu.get_request_args() + vals = scu.get_request_args() if not vals.get("tf_submitted", False): H.append( """
Seuls les modules cochés font partie de ce semestre. Pour les retirer, les décocher et appuyer sur le bouton "modifier". diff --git a/app/scodoc/sco_formsemestre_inscriptions.py b/app/scodoc/sco_formsemestre_inscriptions.py index 7f069a6149..c6bd3fab0f 100644 --- a/app/scodoc/sco_formsemestre_inscriptions.py +++ b/app/scodoc/sco_formsemestre_inscriptions.py @@ -468,7 +468,7 @@ def formsemestre_inscription_option(etudid, formsemestre_id): modimpls_by_ue_names[ue_id].append( "%s %s" % (mod["module"]["code"], mod["module"]["titre"]) ) - scu.get_request_args() + vals = scu.get_request_args() if not vals.get("tf_submitted", False): # inscrit ? for ins in inscr: diff --git a/app/scodoc/sco_liste_notes.py b/app/scodoc/sco_liste_notes.py index b072a0c23a..672a8754fe 100644 --- a/app/scodoc/sco_liste_notes.py +++ b/app/scodoc/sco_liste_notes.py @@ -64,7 +64,7 @@ def do_evaluation_listenotes(): (si moduleimpl_id, affiche toutes les évaluatons du module) """ mode = None - scu.get_request_args() + vals = scu.get_request_args() if "evaluation_id" in vals: evaluation_id = int(vals["evaluation_id"]) mode = "eval" diff --git a/app/scodoc/sco_saisie_notes.py b/app/scodoc/sco_saisie_notes.py index c309ac0c33..59a1d6d906 100644 --- a/app/scodoc/sco_saisie_notes.py +++ b/app/scodoc/sco_saisie_notes.py @@ -169,7 +169,7 @@ def do_evaluation_upload_xls(): Soumission d'un fichier XLS (evaluation_id, notefile) """ authuser = current_user - scu.get_request_args() + vals = scu.get_request_args() evaluation_id = int(vals["evaluation_id"]) comment = vals["comment"] E = sco_evaluations.do_evaluation_list({"evaluation_id": evaluation_id})[0] diff --git a/app/scodoc/sco_trombino.py b/app/scodoc/sco_trombino.py index b74149dbbf..7b38f6a2d3 100644 --- a/app/scodoc/sco_trombino.py +++ b/app/scodoc/sco_trombino.py @@ -514,7 +514,7 @@ def photos_import_files_form(group_ids=[]): % groups_infos.groups_query_args, ] F = html_sco_header.sco_footer() - scu.get_request_args() + vals = scu.get_request_args() vals["group_ids"] = groups_infos.group_ids tf = TrivialFormulator( request.base_url, diff --git a/app/views/entreprises.py b/app/views/entreprises.py index 730e0bb5d3..9d1e76a061 100644 --- a/app/views/entreprises.py +++ b/app/views/entreprises.py @@ -32,15 +32,15 @@ Note: Code très ancien, porté de Zope/DTML, peu utilisable => Voir si des départements utilisent encore ce module et envisager de le supprimer. """ -import six.moves.urllib.request, six.moves.urllib.parse, six.moves.urllib.error -import string -import re + + import time -import calendar from flask import request from flask_login import current_user +from app.scodoc import sco_utils as scu + # MIGRATION EN COURS => MODULE DESACTIVE ! # A REVOIR @@ -94,7 +94,7 @@ def sidebar(): ) # --- entreprise selectionnée: - scu.get_request_args() + vals = scu.get_request_args() if "entreprise_id" in vals: entreprise_id = vals["entreprise_id"] E = sco_entreprises.do_entreprise_list(args={"entreprise_id": entreprise_id}) @@ -147,7 +147,7 @@ def index_html(etud_nom=None, limit=50, offset="", format="html"): limit = int(limit) if offset: offset = int(offset or 0) - scu.get_request_args() + vals = scu.get_request_args() if etud_nom: entreprises = sco_entreprises.do_entreprise_list_by_etud( args=vals, sort_on_contact=True diff --git a/app/views/notes.py b/app/views/notes.py index 3dc519c2e9..103121ece3 100644 --- a/app/views/notes.py +++ b/app/views/notes.py @@ -1892,7 +1892,7 @@ def appreciation_add_form( app = apps[0] formsemestre_id = app["formsemestre_id"] etudid = app["etudid"] - scu.get_request_args() + vals = scu.get_request_args() if "edit" in vals: edit = int(vals["edit"]) elif id: diff --git a/app/views/scolar.py b/app/views/scolar.py index a84cdfeedf..9dffed327f 100644 --- a/app/views/scolar.py +++ b/app/views/scolar.py @@ -1134,7 +1134,7 @@ def _etudident_create_or_edit_form(edit): "Le formulaire HTML" H = [html_sco_header.sco_header(init_jquery_ui=True)] F = html_sco_header.sco_footer() - scu.get_request_args() + vals = scu.get_request_args() etudid = vals.get("etudid", None) cnx = ndb.GetDBConnexion() descr = [] @@ -1177,7 +1177,7 @@ def _etudident_create_or_edit_form(edit): # except ValueError: # infos = None # pass # XXX a terminer - scu.get_request_args() + vals = scu.get_request_args() nom = vals.get("nom", None) if nom is None: nom = initvalues.get("nom", None) diff --git a/app/views/users.py b/app/views/users.py index 4d3e465d5e..3e3e7e8d7f 100644 --- a/app/views/users.py +++ b/app/views/users.py @@ -330,7 +330,7 @@ def create_user_form(user_name=None, edit=0, all_roles=1): }, ), ] - scu.get_request_args() + vals = scu.get_request_args() if "tf_submitted" in vals and not "roles" in vals: vals["roles"] = [] if "tf_submitted" in vals: diff --git a/sco_version.py b/sco_version.py index 2bbdbe8bf9..2147fbb7e2 100644 --- a/sco_version.py +++ b/sco_version.py @@ -1,7 +1,7 @@ # -*- mode: python -*- # -*- coding: utf-8 -*- -SCOVERSION = "9.0.42" +SCOVERSION = "9.0.43" SCONAME = "ScoDoc"