Skip to content
Snippets Groups Projects
Commit 8a8c36fa authored by srosse's avatar srosse
Browse files

OO-1881: check if window control is null, which is allowed

parent 1f9ca6b5
No related branches found
No related tags found
No related merge requests found
...@@ -23,6 +23,7 @@ import java.util.Date; ...@@ -23,6 +23,7 @@ import java.util.Date;
import org.olat.core.CoreSpringFactory; import org.olat.core.CoreSpringFactory;
import org.olat.core.gui.control.ChiefController; import org.olat.core.gui.control.ChiefController;
import org.olat.core.gui.control.WindowControl;
import org.olat.core.id.OLATResourceable; import org.olat.core.id.OLATResourceable;
import org.olat.course.assessment.AssessmentModeManager; import org.olat.course.assessment.AssessmentModeManager;
import org.olat.course.editor.CourseEditorEnv; import org.olat.course.editor.CourseEditorEnv;
...@@ -60,7 +61,11 @@ public class IsAssessmentModeFunction extends AbstractFunction { ...@@ -60,7 +61,11 @@ public class IsAssessmentModeFunction extends AbstractFunction {
return defaultValue(); return defaultValue();
} }
ChiefController chiefController = getUserCourseEnv().getWindowControl().getWindowBackOffice().getChiefController(); WindowControl wControl = getUserCourseEnv().getWindowControl();
if(wControl == null) {
return ConditionInterpreter.INT_FALSE;
}
ChiefController chiefController = wControl.getWindowBackOffice().getChiefController();
if(chiefController == null) { if(chiefController == null) {
return ConditionInterpreter.INT_FALSE; return ConditionInterpreter.INT_FALSE;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment