1
0
forked from ScoDoc/ScoDoc

- downgrade werkzeug (for Flask-Login compat)

- remove unimplemented preferences (forcer_present, assi_etat_defaut)
This commit is contained in:
Emmanuel Viennet 2023-10-07 10:14:50 +02:00
parent a4aab13efd
commit 574fae2170
4 changed files with 17 additions and 16 deletions

View File

@ -631,16 +631,16 @@ class BasePreferences:
"category": "assi", "category": "assi",
}, },
), ),
( # (
"forcer_present", # "forcer_present",
{ # {
"initvalue": 0, # "initvalue": 0,
"title": "Forcer l'appel des présents", # "title": "Forcer l'appel des présents",
"input_type": "boolcheckbox", # "input_type": "boolcheckbox",
"labels": ["non", "oui"], # "labels": ["non", "oui"],
"category": "assi", # "category": "assi",
}, # },
), # ),
( (
"periode_defaut", "periode_defaut",
{ {
@ -656,6 +656,7 @@ class BasePreferences:
( (
"assi_etat_defaut", "assi_etat_defaut",
{ {
"explanation": "⚠ non fonctionnel, travaux en cours !",
"initvalue": "aucun", "initvalue": "aucun",
"input_type": "menu", "input_type": "menu",
"labels": ["aucun", "present", "retard", "absent"], "labels": ["aucun", "present", "retard", "absent"],

View File

@ -273,7 +273,7 @@
</style> </style>
<script> <script>
const etatDef = "{{etat_def}}"; const assi_etat_defaut = "{{assi_etat_defaut}}";
window.forceModule = "{{ forcer_module }}" window.forceModule = "{{ forcer_module }}"
window.forceModule = window.forceModule == "True" ? true : false window.forceModule = window.forceModule == "True" ? true : false
@ -375,8 +375,8 @@
rows[i].appendChild(td); rows[i].appendChild(td);
if (etatDef != "" && etatDef != "aucun") { if (assi_etat_defaut != "" && assi_etat_defaut != "aucun") {
const inp = td.querySelector(`[value='${etatDef}']`).checked = true; const inp = td.querySelector(`[value='${assi_etat_defaut}']`).checked = true;
} }
} }
} }

View File

@ -1317,7 +1317,7 @@ def _differee(
dept_id=g.scodoc_dept_id, dept_id=g.scodoc_dept_id,
) )
etat_def = sco_preferences.get_preference( assi_etat_defaut = sco_preferences.get_preference(
"assi_etat_defaut", "assi_etat_defaut",
formsemestre_id=formsemestre_id, formsemestre_id=formsemestre_id,
dept_id=g.scodoc_dept_id, dept_id=g.scodoc_dept_id,
@ -1326,7 +1326,7 @@ def _differee(
return render_template( return render_template(
"assiduites/widgets/differee.j2", "assiduites/widgets/differee.j2",
etudiants=etudiants, etudiants=etudiants,
etat_def=etat_def, assi_etat_defaut=assi_etat_defaut,
forcer_module=forcer_module, forcer_module=forcer_module,
moduleimpl_select=moduleimpl_select, moduleimpl_select=moduleimpl_select,
date=date, date=date,

View File

@ -107,7 +107,7 @@ urllib3==2.0.6
visitor==0.1.3 visitor==0.1.3
weasyprint==60.1 weasyprint==60.1
webencodings==0.5.1 webencodings==0.5.1
Werkzeug==3.0.0 Werkzeug==2.3.7
wrapt==1.15.0 wrapt==1.15.0
WTForms==3.0.1 WTForms==3.0.1
xmltodict==0.13.0 xmltodict==0.13.0