From d8a41845477918b3ac251d2f9b6ab7525827f0ad Mon Sep 17 00:00:00 2001 From: IDK Date: Sat, 1 May 2021 17:44:06 +0200 Subject: [PATCH] ListeAbsEtud: add ampm --- ZAbsences.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ZAbsences.py b/ZAbsences.py index 52a68c6a2..035aea9c3 100644 --- a/ZAbsences.py +++ b/ZAbsences.py @@ -1313,7 +1313,7 @@ class ZAbsences( if with_evals: a["exams"] = descr_exams(a) a["datedmy"] = a["jour"].strftime("%d/%m/%Y") - a["matin_o"] = int(a["matin"]) + a["ampm"] = int(a["matin"]) a["matin"] = matin(a["matin"]) index = a["description"].find(")") if index != -1: @@ -1328,7 +1328,7 @@ class ZAbsences( a["justlink"] = "justifier" a["_justlink_target"] = ( "doJustifAbsence?etudid=%s&datedebut=%s&datefin=%s&demijournee=%s" - % (etudid, a["datedmy"], a["datedmy"], a["matin_o"]) + % (etudid, a["datedmy"], a["datedmy"], a["ampm"]) ) # titles = { @@ -1340,6 +1340,8 @@ class ZAbsences( "motif": "Motif", } columns_ids = ["datedmy", "matin"] + if format in ("json", "xml"): + columns_ids += ["jour", "ampm"] if with_evals: columns_ids.append("exams")