forked from ScoDoc/ScoDoc
Assiduité : suppression préférence periode_defaut
This commit is contained in:
parent
1cec3fa703
commit
70995fbd7e
@ -110,6 +110,7 @@ get_base_preferences(formsemestre_id)
|
|||||||
Return base preferences for current scodoc_dept (instance BasePreferences)
|
Return base preferences for current scodoc_dept (instance BasePreferences)
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import flask
|
import flask
|
||||||
from flask import current_app, flash, g, request, url_for
|
from flask import current_app, flash, g, request, url_for
|
||||||
|
|
||||||
@ -622,18 +623,6 @@ class BasePreferences:
|
|||||||
"explanation": "Désactive la saisie et l'affichage des présences",
|
"explanation": "Désactive la saisie et l'affichage des présences",
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
(
|
|
||||||
"periode_defaut",
|
|
||||||
{
|
|
||||||
"initvalue": 2.0,
|
|
||||||
"size": 10,
|
|
||||||
"title": "Durée par défaut d'un créneau",
|
|
||||||
"type": "float",
|
|
||||||
"category": "assi",
|
|
||||||
"only_global": True,
|
|
||||||
"explanation": "Durée d'un créneau en heure. Utilisé dans les pages de saisie",
|
|
||||||
},
|
|
||||||
),
|
|
||||||
(
|
(
|
||||||
"nb_heures_par_jour",
|
"nb_heures_par_jour",
|
||||||
{
|
{
|
||||||
@ -2302,9 +2291,7 @@ class BasePreferences:
|
|||||||
if "explanation" in descr:
|
if "explanation" in descr:
|
||||||
del descr["explanation"]
|
del descr["explanation"]
|
||||||
if formsemestre_id:
|
if formsemestre_id:
|
||||||
descr[
|
descr["explanation"] = f"""ou <span class="spanlink"
|
||||||
"explanation"
|
|
||||||
] = f"""ou <span class="spanlink"
|
|
||||||
onclick="set_global_pref(this, '{pref_name}');"
|
onclick="set_global_pref(this, '{pref_name}');"
|
||||||
>utiliser paramètre global</span>"""
|
>utiliser paramètre global</span>"""
|
||||||
if formsemestre_id and self.is_global(formsemestre_id, pref_name):
|
if formsemestre_id and self.is_global(formsemestre_id, pref_name):
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
const tick_time = 60 / {{ tick_time }};
|
const tick_time = 60 / {{ tick_time }};
|
||||||
const tick_delay = 1 / tick_time;
|
const tick_delay = 1 / tick_time;
|
||||||
|
|
||||||
const period_default = {{ periode_defaut }};
|
const period_default = 2;
|
||||||
|
|
||||||
let handleMoving = false;
|
let handleMoving = false;
|
||||||
|
|
||||||
|
@ -2229,17 +2229,10 @@ def _differee(
|
|||||||
dept_id=g.scodoc_dept_id,
|
dept_id=g.scodoc_dept_id,
|
||||||
)
|
)
|
||||||
|
|
||||||
periode_defaut = sco_preferences.get_preference(
|
|
||||||
"periode_defaut",
|
|
||||||
formsemestre_id=formsemestre_id,
|
|
||||||
dept_id=g.scodoc_dept_id,
|
|
||||||
)
|
|
||||||
|
|
||||||
return render_template(
|
return render_template(
|
||||||
"assiduites/widgets/differee.j2",
|
"assiduites/widgets/differee.j2",
|
||||||
etudiants=etudiants,
|
etudiants=etudiants,
|
||||||
assi_etat_defaut=assi_etat_defaut,
|
assi_etat_defaut=assi_etat_defaut,
|
||||||
periode_defaut=periode_defaut,
|
|
||||||
forcer_module=forcer_module,
|
forcer_module=forcer_module,
|
||||||
moduleimpl_select=moduleimpl_select,
|
moduleimpl_select=moduleimpl_select,
|
||||||
date=date,
|
date=date,
|
||||||
@ -2316,7 +2309,7 @@ def _module_selector_multiple(
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def _timeline(formsemestre_id: int = None, heures=None) -> str:
|
def _timeline(heures=None) -> str:
|
||||||
"""
|
"""
|
||||||
_timeline retourne l'html de la timeline
|
_timeline retourne l'html de la timeline
|
||||||
|
|
||||||
@ -2334,9 +2327,6 @@ def _timeline(formsemestre_id: int = None, heures=None) -> str:
|
|||||||
t_mid=ScoDocSiteConfig.assi_get_rounded_time("assi_lunch_time", "13:00:00"),
|
t_mid=ScoDocSiteConfig.assi_get_rounded_time("assi_lunch_time", "13:00:00"),
|
||||||
t_end=ScoDocSiteConfig.assi_get_rounded_time("assi_afternoon_time", "18:00:00"),
|
t_end=ScoDocSiteConfig.assi_get_rounded_time("assi_afternoon_time", "18:00:00"),
|
||||||
tick_time=ScoDocSiteConfig.get("assi_tick_time", 15),
|
tick_time=ScoDocSiteConfig.get("assi_tick_time", 15),
|
||||||
periode_defaut=sco_preferences.get_preference(
|
|
||||||
"periode_defaut", formsemestre_id
|
|
||||||
),
|
|
||||||
heures=heures,
|
heures=heures,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user