diff --git a/sco_groups_view.py b/sco_groups_view.py
index 8d47b0ed..5518bf48 100644
--- a/sco_groups_view.py
+++ b/sco_groups_view.py
@@ -798,6 +798,11 @@ def tab_absences_html(context, groups_infos, etat=None, REQUEST=None):
"
Absences
",
'',
"- ",
+ form_choix_saisie_semaine(
+ context, groups_infos, REQUEST=REQUEST
+ ), # Ajout Le Havre
+ "
",
+ "- ",
form_choix_jour_saisie_hebdo(context, groups_infos, REQUEST=REQUEST),
"
",
"""- Etat des absences du groupe
"""
@@ -888,6 +893,37 @@ def form_choix_jour_saisie_hebdo(context, groups_infos, REQUEST=None):
return "\n".join(FA)
+# Ajout Le Havre
+# Formulaire saisie absences semaine
+def form_choix_saisie_semaine(context, groups_infos, REQUEST=None):
+ authuser = REQUEST.AUTHENTICATED_USER
+ if not authuser.has_permission(ScoAbsChange, context):
+ return ""
+ sem = groups_infos.formsemestre
+ # construit l'URL "destination"
+ # (a laquelle on revient apres saisie absences)
+ query_args = cgi.parse_qs(REQUEST.QUERY_STRING)
+ moduleimpl_id = query_args.get("moduleimpl_id", [""])[0]
+ if "head_message" in query_args:
+ del query_args["head_message"]
+ destination = "%s?%s" % (REQUEST.URL, urllib.urlencode(query_args, True))
+ destination = destination.replace(
+ "%", "%%"
+ ) # car ici utilisee dans un format string !
+
+ DateJour = time.strftime("%d/%m/%Y")
+ datelundi = ZAbsences.ddmmyyyy(DateJour).prev_monday()
+ FA = [] # formulaire avec menu saisi hebdo des absences
+ FA.append('
")
+ return "\n".join(FA)
+
+
def export_groups_as_moodle_csv(context, formsemestre_id=None, REQUEST=None):
"""Export all students/groups, in a CSV format suitable for Moodle
Each (student,group) will be listed on a separate line