1
0
forked from ScoDoc/ScoDoc

Modif freq. max. news

This commit is contained in:
Emmanuel Viennet 2022-04-13 00:32:31 +02:00
parent fb5425c3f6
commit 424d376692
4 changed files with 8 additions and 6 deletions

View File

@ -93,7 +93,7 @@ def do_matiere_create(args):
typ=ScolarNews.NEWS_FORM,
obj=ue["formation_id"],
text=f"Modification de la formation {formation.acronyme}",
max_frequency=3,
max_frequency=10 * 60,
)
formation.invalidate_cached_sems()
return r
@ -199,7 +199,7 @@ def do_matiere_delete(oid):
typ=ScolarNews.NEWS_FORM,
obj=ue["formation_id"],
text=f"Modification de la formation {formation.acronyme}",
max_frequency=3,
max_frequency=10 * 60,
)
formation.invalidate_cached_sems()

View File

@ -107,7 +107,7 @@ def do_module_create(args) -> int:
typ=ScolarNews.NEWS_FORM,
obj=formation.id,
text=f"Modification de la formation {formation.acronyme}",
max_frequency=3,
max_frequency=10 * 60,
)
formation.invalidate_cached_sems()
return r
@ -398,7 +398,7 @@ def do_module_delete(oid):
typ=ScolarNews.NEWS_FORM,
obj=mod["formation_id"],
text=f"Modification de la formation {formation.acronyme}",
max_frequency=3,
max_frequency=10 * 60,
)
formation.invalidate_cached_sems()

View File

@ -139,7 +139,7 @@ def do_ue_create(args):
typ=ScolarNews.NEWS_FORM,
obj=args["formation_id"],
text=f"Modification de la formation {formation.acronyme}",
max_frequency=3,
max_frequency=10 * 60,
)
formation.invalidate_cached_sems()
return ue_id
@ -223,7 +223,7 @@ def do_ue_delete(ue_id, delete_validations=False, force=False):
typ=ScolarNews.NEWS_FORM,
obj=ue.formation_id,
text="Modification de la formation %(acronyme)s" % F,
max_frequency=3,
max_frequency=10 * 60,
)
#
if not force:

View File

@ -280,6 +280,7 @@ def do_evaluation_upload_xls():
obj=M["moduleimpl_id"],
text='Chargement notes dans <a href="%(url)s">%(titre)s</a>' % mod,
url=mod["url"],
max_frequency=30 * 60, # 30 minutes
)
msg = (
@ -365,6 +366,7 @@ def do_evaluation_set_missing(evaluation_id, value, dialog_confirmed=False):
obj=M["moduleimpl_id"],
text='Initialisation notes dans <a href="%(url)s">%(titre)s</a>' % mod,
url=mod["url"],
max_frequency=30 * 60,
)
return (
html_sco_header.sco_header()