From 315a80b6709170b95ecf8c838d241664c429252c Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Sun, 29 Aug 2021 23:04:38 +0200 Subject: [PATCH] =?UTF-8?q?d=C3=A9but=20r=C3=A9int=C3=A9gration=20module?= =?UTF-8?q?=20poursuite=20d'=C3=A9tudes.=20Pb=20excel=20=C3=A0=20r=C3=A9gl?= =?UTF-8?q?er.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/scodoc/pe_jurype.py | 12 +++++++++--- app/scodoc/pe_semestretag.py | 4 ++-- app/scodoc/pe_tagtable.py | 4 +++- app/views/notes.py | 7 ++++++- 4 files changed, 20 insertions(+), 7 deletions(-) diff --git a/app/scodoc/pe_jurype.py b/app/scodoc/pe_jurype.py index 5aee97f9..ce3a43fd 100644 --- a/app/scodoc/pe_jurype.py +++ b/app/scodoc/pe_jurype.py @@ -487,9 +487,15 @@ class JuryPE(object): # if PETable.AFFICHAGE_DEBUG_PE == True : pe_tools.pe_print(" derniere inscription = ", lastDateSem) semestresDeScoDoc = sco_formsemestre.do_formsemestre_list() - semestresSuperieurs = [ - sem for sem in semestresDeScoDoc if sem["semestre_id"] > sonDernierSidValide - ] # Semestre de rang plus élevé que son dernier sem valide + if sonDernierSidValide is None: + # si l'étudiant n'a validé aucun semestre, les prend tous ? (à vérifier) + semestresSuperieurs = semestresDeScoDoc + else: + semestresSuperieurs = [ + sem + for sem in semestresDeScoDoc + if sem["semestre_id"] > sonDernierSidValide + ] # Semestre de rang plus élevé que son dernier sem valide datesDesSemestresSuperieurs = [ pe_tagtable.conversionDate_StrToDate(sem["date_debut"]) for sem in semestresSuperieurs diff --git a/app/scodoc/pe_semestretag.py b/app/scodoc/pe_semestretag.py index 286c7cd9..80e25620 100644 --- a/app/scodoc/pe_semestretag.py +++ b/app/scodoc/pe_semestretag.py @@ -280,8 +280,8 @@ class SemestreTag(pe_tagtable.TableTag): modprec_id = modimpl_prec[0]["moduleimpl_id"] moy_ue_capitalisee = get_moy_ue_from_nt(nt_prec, etudid, modprec_id) if ( - moy_ue_actuelle >= moy_ue_capitalisee - ): # on prend la meilleure ue + moy_ue_capitalisee is None + ) or moy_ue_actuelle >= moy_ue_capitalisee: # on prend la meilleure ue note = self.nt.get_etud_mod_moy( modimpl_id, etudid ) # lecture de la note diff --git a/app/scodoc/pe_tagtable.py b/app/scodoc/pe_tagtable.py index 850832b9..dbc6bf03 100644 --- a/app/scodoc/pe_tagtable.py +++ b/app/scodoc/pe_tagtable.py @@ -179,7 +179,9 @@ class TableTag(object): # Calcule les rangs lesMoyennesTriees = sorted( - listMoyEtCoeff, reverse=True, key=lambda col: col[0] + listMoyEtCoeff, + reverse=True, + key=lambda col: col[0] or 0, # remplace les None par des zéros ) # triées self.rangs[tag] = notes_table.comp_ranks(lesMoyennesTriees) # les rangs diff --git a/app/views/notes.py b/app/views/notes.py index 0c7c57a4..9045a94d 100644 --- a/app/views/notes.py +++ b/app/views/notes.py @@ -2357,7 +2357,12 @@ sco_publish( sco_poursuite_dut.formsemestre_poursuite_report, Permission.ScoView, ) -sco_publish("/pe_view_sem_recap", pe_view.pe_view_sem_recap, Permission.ScoView) +sco_publish( + "/pe_view_sem_recap", + pe_view.pe_view_sem_recap, + Permission.ScoView, + methods=["GET", "POST"], +) sco_publish( "/report_debouche_date", sco_debouche.report_debouche_date, Permission.ScoView )