From 2072e882250c704d4bb6a5aea23b2171983b1361 Mon Sep 17 00:00:00 2001 From: srosse <none@none> Date: Tue, 22 Nov 2016 09:26:18 +0100 Subject: [PATCH] OO-2382: hardened the update of the css of the submit button (which isn't critical enough to send a red screen) --- .../olat/course/nodes/gta/ui/GTAParticipantController.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/olat/course/nodes/gta/ui/GTAParticipantController.java b/src/main/java/org/olat/course/nodes/gta/ui/GTAParticipantController.java index e835225d8f0..4b5758fdd0c 100644 --- a/src/main/java/org/olat/course/nodes/gta/ui/GTAParticipantController.java +++ b/src/main/java/org/olat/course/nodes/gta/ui/GTAParticipantController.java @@ -666,6 +666,7 @@ public class GTAParticipantController extends GTAAbstractController { } cleanUpPopups(); } else if(submitDocCtrl == source) { + boolean hasUploadDocuments = submitDocCtrl.hasUploadDocuments(); if(event instanceof SubmitEvent) { Task assignedTask = submitDocCtrl.getAssignedTask(); gtaManager.log("Submit", (SubmitEvent)event, assignedTask, getIdentity(), assessedIdentity, assessedGroup, courseEnv, gtaNode); @@ -673,8 +674,10 @@ public class GTAParticipantController extends GTAAbstractController { cleanUpProcess(); process(ureq); } - submitButton.setCustomEnabledLinkCSS(submitDocCtrl.hasUploadDocuments() ? "btn btn-primary" : "btn btn-default"); - + + if(submitButton != null) { + submitButton.setCustomEnabledLinkCSS(hasUploadDocuments ? "btn btn-primary" : "btn btn-default"); + } } super.event(ureq, source, event); } -- GitLab