From f11dba256b99617c9da864260bdeffab1159df55 Mon Sep 17 00:00:00 2001
From: srosse <none@none>
Date: Thu, 21 Sep 2017 15:15:29 +0200
Subject: [PATCH] OO-2955	: all must select the Authorized absences
 check box if the configuration need it

---
 .../modules/lecture/ui/TeacherRollCallController.java     | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/main/java/org/olat/modules/lecture/ui/TeacherRollCallController.java b/src/main/java/org/olat/modules/lecture/ui/TeacherRollCallController.java
index f2ffa103880..717ae27b2f3 100644
--- a/src/main/java/org/olat/modules/lecture/ui/TeacherRollCallController.java
+++ b/src/main/java/org/olat/modules/lecture/ui/TeacherRollCallController.java
@@ -531,6 +531,14 @@ public class TeacherRollCallController extends FormBasicController {
 			check.select(onKeys[0], true);
 		}
 		row.setRollCall(rollCall);
+		if(authorizedAbsenceEnabled) {
+			if(rollCall.getAbsenceAuthorized() != null && rollCall.getAbsenceAuthorized().booleanValue()) {
+				row.getAuthorizedAbsence().select(onKeys[0], true);
+			} else {
+				row.getAuthorizedAbsence().uncheckAll();
+			}
+			row.getAuthorizedAbsenceCont().setDirty(true);
+		}
 		row.getRollCallStatusEl().getComponent().setDirty(true);
 		tableEl.reloadData();
 		flc.setDirty(true);
-- 
GitLab