From a043cb26edb8dc6d6abd9344bc02be983d53f370 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Tue, 14 Nov 2023 22:48:28 +0100 Subject: [PATCH] Fix: invalidation cache sur modif evaluation --- app/scodoc/sco_evaluation_edit.py | 8 +++++--- app/static/css/edt.css | 9 ++++++++- app/templates/formsemestre/edt.j2 | 13 +++++++++++++ 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/app/scodoc/sco_evaluation_edit.py b/app/scodoc/sco_evaluation_edit.py index c24be275..ed63817c 100644 --- a/app/scodoc/sco_evaluation_edit.py +++ b/app/scodoc/sco_evaluation_edit.py @@ -45,6 +45,7 @@ from app.scodoc.sco_utils import ModuleType from app.scodoc.sco_exceptions import ScoValueError from app.scodoc.TrivialFormulator import TrivialFormulator from app.scodoc import html_sco_header +from app.scodoc import sco_cache from app.scodoc import sco_evaluations from app.scodoc import sco_moduleimpl from app.scodoc import sco_preferences @@ -87,7 +88,7 @@ def evaluation_create_form( {html_sco_header.sco_header()}

Opération non autorisée

Modification évaluation impossible pour {current_user.get_nomplogin()}

-

Revenir

@@ -131,7 +132,7 @@ def evaluation_create_form( H = [ f"""

{action} en {scu.MODULE_TYPE_NAMES[mod["module_type"]]} {mod["code"] or "module sans code"} {mod["titre"]} {link}

""" @@ -299,7 +300,7 @@ def evaluation_create_form( "type": "float", "explanation": f""" ({ - "coef. mod.:" +str(coef_ue) if coef_ue + "coef. mod.:" +str(coef_ue) if coef_ue else "ce module n'a pas de coef. dans cette UE" }) {ue.titre} @@ -382,4 +383,5 @@ def evaluation_create_form( evaluation.set_ue_poids(ue, tf[2][f"poids_{ue.id}"]) db.session.add(evaluation) db.session.commit() + sco_cache.invalidate_formsemestre(evaluation.moduleimpl.formsemestre.id) return flask.redirect(dest_url) diff --git a/app/static/css/edt.css b/app/static/css/edt.css index b0990d8f..135be653 100644 --- a/app/static/css/edt.css +++ b/app/static/css/edt.css @@ -23,5 +23,12 @@ height: calc(100% - 44px) !important; } .toastui-calendar-week-view-day-names, .toastui-calendar-time { - overflow: hidden !important; + overflow: hidden !important; +} + +.ic-arrow-line-left { + background: url('../icons/ic-arrow-line-left.png') no-repeat; +} +.ic-arrow-line-right { + background: url('../icons/ic-arrow-line-right.png') no-repeat; } diff --git a/app/templates/formsemestre/edt.j2 b/app/templates/formsemestre/edt.j2 index d5bb1deb..d8c92eb4 100644 --- a/app/templates/formsemestre/edt.j2 +++ b/app/templates/formsemestre/edt.j2 @@ -13,6 +13,19 @@

Expérimental: emploi du temps

+
+ + + + + + +