From 802440010399e4d645ac781d7033a06aeec4e839 Mon Sep 17 00:00:00 2001
From: srosse <none@none>
Date: Mon, 30 Oct 2017 09:08:42 +0100
Subject: [PATCH] OO-3101: fix validation of roll call with "Authorized
 absences" disabled

---
 .../olat/modules/lecture/ui/TeacherRollCallController.java | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

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 4d79e81dde4..96dfc803b26 100644
--- a/src/main/java/org/olat/modules/lecture/ui/TeacherRollCallController.java
+++ b/src/main/java/org/olat/modules/lecture/ui/TeacherRollCallController.java
@@ -419,13 +419,16 @@ public class TeacherRollCallController extends FormBasicController {
 
 		for(int i=tableModel.getRowCount(); i-->0; ) {
 			TeacherRollCallRow row = tableModel.getObject(i);
-			row.getAuthorizedAbsence().clearError();
+			
+			if(row.getAuthorizedAbsence() != null) {
+				row.getAuthorizedAbsence().clearError();
+			}
 			
 			if(row.getRollCall() == null) {
 				//??? stop?
 			} else if(!absenceDefaultAuthorized) {
 				String reason = row.getRollCall().getAbsenceReason();
-				if(row.getAuthorizedAbsence().isAtLeastSelected(1) && !StringHelper.containsNonWhitespace(reason)) {
+				if(row.getAuthorizedAbsence() != null && row.getAuthorizedAbsence().isAtLeastSelected(1) && !StringHelper.containsNonWhitespace(reason)) {
 					row.getAuthorizedAbsence().setErrorKey("error.reason.mandatory", null);
 					allOk &= false;
 				}
-- 
GitLab