From 6a18188eda8f9e649090d43428138f20352ddde9 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Tue, 13 Jul 2021 16:39:41 +0200 Subject: [PATCH] misc fixes --- app/scodoc/pe_view.py | 2 +- app/scodoc/sco_compute_moy.py | 2 +- app/scodoc/sco_debouche.py | 2 +- app/scodoc/sco_report.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/scodoc/pe_view.py b/app/scodoc/pe_view.py index 894184a90..f992ad9b3 100644 --- a/app/scodoc/pe_view.py +++ b/app/scodoc/pe_view.py @@ -89,7 +89,7 @@ def pe_view_sem_recap( mode_debug = Pour "squeezer" le calcul du jury pe (long) et debugger uniquement la partie avis latex """ - if REQUEST and REQUEST.method == "GET": + if REQUEST and REQUEST.REQUEST_METHOD == "GET": return _pe_view_sem_recap_form(context, formsemestre_id, REQUEST=REQUEST) prefs = sco_preferences.SemPreferences(context, formsemestre_id=formsemestre_id) diff --git a/app/scodoc/sco_compute_moy.py b/app/scodoc/sco_compute_moy.py index 746494d35..2b11c963f 100644 --- a/app/scodoc/sco_compute_moy.py +++ b/app/scodoc/sco_compute_moy.py @@ -361,7 +361,7 @@ def do_moduleimpl_moyennes(context, nt, mod): if eval_rattr["evaluation_type"] == EVALUATION_RATTRAPAGE: # rattrapage classique: prend la meilleure note entre moyenne # module et note eval rattrapage - if note_sur_20 > R[etudid]: + if (R[etudid] == "NA0") or (note_sur_20 > R[etudid]): # log('note_sur_20=%s' % note_sur_20) R[etudid] = note_sur_20 elif eval_rattr["evaluation_type"] == EVALUATION_SESSION2: diff --git a/app/scodoc/sco_debouche.py b/app/scodoc/sco_debouche.py index 9e9056597..ba91e8245 100644 --- a/app/scodoc/sco_debouche.py +++ b/app/scodoc/sco_debouche.py @@ -111,7 +111,7 @@ def table_debouche_etudids(context, etudids, keep_numeric=True): etud = sco_etud.get_etud_info(filled=1, etudid=etudid)[0] # retrouve le "dernier" semestre (au sens de la date de fin) sems = etud["sems"] - es = [(s["date_fin-iso"], i) for i, s in enumerate(sems)] + es = [(s["date_fin_iso"], i) for i, s in enumerate(sems)] imax = max(es)[1] last_sem = sems[imax] nt = sco_core.get_notes_cache( diff --git a/app/scodoc/sco_report.py b/app/scodoc/sco_report.py index 9662518dd..b6c2f5175 100644 --- a/app/scodoc/sco_report.py +++ b/app/scodoc/sco_report.py @@ -447,7 +447,7 @@ def table_suivi_cohorte( S[s["formsemestre_id"]] = s bacs.add(etud["bac"]) bacspecialites.add(bacspe) - annee_bacs.add(etud["annee_bac"]) + annee_bacs.add(str(etud["annee_bac"])) civilites.add(etud["civilite"]) if etud["statut"]: # ne montre pas les statuts non renseignés statuts.add(etud["statut"])