diff --git a/app/pe/README.md b/app/pe/README.md new file mode 100644 index 00000000..bace3081 --- /dev/null +++ b/app/pe/README.md @@ -0,0 +1,8 @@ +# Module "Avis de poursuite d'étude" + +Conçu et développé sur ScoDoc 7 par Cléo Baras (IUT de Grenoble) pour le DUT. + +Actuellement non opérationnel dans ScoDoc 9. + + + diff --git a/app/scodoc/pe_avislatex.py b/app/pe/pe_avislatex.py similarity index 99% rename from app/scodoc/pe_avislatex.py rename to app/pe/pe_avislatex.py index 70fe390d..a1cf300b 100644 --- a/app/scodoc/pe_avislatex.py +++ b/app/pe/pe_avislatex.py @@ -33,9 +33,9 @@ import os import codecs import re -from app.scodoc import pe_jurype -from app.scodoc import pe_tagtable -from app.scodoc import pe_tools +from app.pe import pe_jurype +from app.pe import pe_tagtable +from app.pe import pe_tools import app.scodoc.sco_utils as scu import app.scodoc.notesdb as ndb diff --git a/app/scodoc/pe_jurype.py b/app/pe/pe_jurype.py similarity index 99% rename from app/scodoc/pe_jurype.py rename to app/pe/pe_jurype.py index 5fce9070..ca2e9e52 100644 --- a/app/scodoc/pe_jurype.py +++ b/app/pe/pe_jurype.py @@ -52,10 +52,10 @@ from app.scodoc import sco_cache from app.scodoc import sco_codes_parcours # sco_codes_parcours.NEXT -> sem suivant from app.scodoc import sco_etud from app.scodoc import sco_formsemestre -from app.scodoc import pe_tagtable -from app.scodoc import pe_tools -from app.scodoc import pe_semestretag -from app.scodoc import pe_settag +from app.pe import pe_tagtable +from app.pe import pe_tools +from app.pe import pe_semestretag +from app.pe import pe_settag # ---------------------------------------------------------------------------------------- def comp_nom_semestre_dans_parcours(sem): @@ -946,7 +946,7 @@ class JuryPE(object): return list(taglist) def get_allTagInSyntheseJury(self): - """Extrait tous les tags du dictionnaire syntheseJury trié par ordre alphabétique. [] si aucun tag """ + """Extrait tous les tags du dictionnaire syntheseJury trié par ordre alphabétique. [] si aucun tag""" allTags = set() for nom in JuryPE.PARCOURS.keys(): allTags = allTags.union(set(self.get_allTagForAggregat(nom))) @@ -1149,10 +1149,12 @@ class JuryPE(object): # ********************************************** def calcul_anneePromoDUT_d_un_etudiant(self, etudid): - """Calcule et renvoie la date de diplome prévue pour un étudiant fourni avec son etudid - en fonction de sesSemestres de scolarisation""" + """Calcule et renvoie la date de diplome prévue pour un étudiant fourni + avec son etudid en fonction de sesSemestres de scolarisation + et -1 s'il n'y a pas de semestre. + """ sesSemestres = self.get_semestresDUT_d_un_etudiant(etudid) - return max([get_annee_diplome_semestre(sem) for sem in sesSemestres]) + return max([get_annee_diplome_semestre(sem) for sem in sesSemestres] or -1) # ********************************************* # Fonctions d'affichage pour debug diff --git a/app/scodoc/pe_semestretag.py b/app/pe/pe_semestretag.py similarity index 99% rename from app/scodoc/pe_semestretag.py rename to app/pe/pe_semestretag.py index 80e25620..a6729def 100644 --- a/app/scodoc/pe_semestretag.py +++ b/app/pe/pe_semestretag.py @@ -40,7 +40,7 @@ from app import log from app.scodoc import sco_codes_parcours from app.scodoc import sco_cache from app.scodoc import sco_tag_module -from app.scodoc import pe_tagtable +from app.pe import pe_tagtable class SemestreTag(pe_tagtable.TableTag): diff --git a/app/scodoc/pe_settag.py b/app/pe/pe_settag.py similarity index 99% rename from app/scodoc/pe_settag.py rename to app/pe/pe_settag.py index 05eba20f..8fde8d20 100644 --- a/app/scodoc/pe_settag.py +++ b/app/pe/pe_settag.py @@ -36,8 +36,8 @@ Created on Fri Sep 9 09:15:05 2016 @author: barasc """ -from app.scodoc.pe_tools import pe_print, PE_DEBUG -from app.scodoc import pe_tagtable +from app.pe.pe_tools import pe_print, PE_DEBUG +from app.pe import pe_tagtable class SetTag(pe_tagtable.TableTag): diff --git a/app/scodoc/pe_tagtable.py b/app/pe/pe_tagtable.py similarity index 100% rename from app/scodoc/pe_tagtable.py rename to app/pe/pe_tagtable.py diff --git a/app/scodoc/pe_tools.py b/app/pe/pe_tools.py similarity index 100% rename from app/scodoc/pe_tools.py rename to app/pe/pe_tools.py diff --git a/app/scodoc/pe_view.py b/app/pe/pe_view.py similarity index 97% rename from app/scodoc/pe_view.py rename to app/pe/pe_view.py index 45c97acd..3d9c718e 100644 --- a/app/scodoc/pe_view.py +++ b/app/pe/pe_view.py @@ -42,10 +42,10 @@ from app.scodoc import sco_formsemestre from app.scodoc import html_sco_header from app.scodoc import sco_preferences -from app.scodoc import pe_tools -from app.scodoc.pe_tools import PE_LATEX_ENCODING -from app.scodoc import pe_jurype -from app.scodoc import pe_avislatex +from app.pe import pe_tools +from app.pe.pe_tools import PE_LATEX_ENCODING +from app.pe import pe_jurype +from app.pe import pe_avislatex def _pe_view_sem_recap_form(formsemestre_id): diff --git a/app/scodoc/sco_formsemestre_status.py b/app/scodoc/sco_formsemestre_status.py index 0599ef51..c55f5e71 100644 --- a/app/scodoc/sco_formsemestre_status.py +++ b/app/scodoc/sco_formsemestre_status.py @@ -105,7 +105,7 @@ def _build_menu_stats(formsemestre_id): "title": "Documents Avis Poursuite Etudes", "endpoint": "notes.pe_view_sem_recap", "args": {"formsemestre_id": formsemestre_id}, - "enabled": True, + "enabled": current_app.config["TESTING"] or current_app.config["DEBUG"], }, { "title": 'Table "débouchés"', diff --git a/app/views/notes.py b/app/views/notes.py index 05188a51..318abe9d 100644 --- a/app/views/notes.py +++ b/app/views/notes.py @@ -73,12 +73,9 @@ from app.scodoc.sco_exceptions import ( AccessDenied, ) from app.scodoc import html_sco_header -from app.scodoc import htmlutils -from app.scodoc import notes_table -from app.scodoc import pe_view +from app.pe import pe_view from app.scodoc import sco_abs from app.scodoc import sco_apogee_compare -from app.scodoc import sco_apogee_csv from app.scodoc import sco_archives from app.scodoc import sco_bulletins from app.scodoc import sco_bulletins_pdf diff --git a/sco_version.py b/sco_version.py index 7540f032..8ec2aed9 100644 --- a/sco_version.py +++ b/sco_version.py @@ -1,7 +1,7 @@ # -*- mode: python -*- # -*- coding: utf-8 -*- -SCOVERSION = "9.0.38" +SCOVERSION = "9.0.39" SCONAME = "ScoDoc"