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

OO-2832: the user course environment is not always available

parent 7804f322
No related branches found
No related tags found
No related merge requests found
...@@ -440,7 +440,7 @@ public class CourseRuntimeController extends RepositoryEntryRuntimeController im ...@@ -440,7 +440,7 @@ public class CourseRuntimeController extends RepositoryEntryRuntimeController im
tools.setI18nKey("header.tools"); tools.setI18nKey("header.tools");
tools.setElementCssClass("o_sel_course_tools"); tools.setElementCssClass("o_sel_course_tools");
if (reSecurity.isEntryAdmin() || hasCourseRight(CourseRights.RIGHT_COURSEEDITOR)) { if (uce != null && (reSecurity.isEntryAdmin() || hasCourseRight(CourseRights.RIGHT_COURSEEDITOR))) {
boolean managed = RepositoryEntryManagedFlag.isManaged(getRepositoryEntry(), RepositoryEntryManagedFlag.editcontent); boolean managed = RepositoryEntryManagedFlag.isManaged(getRepositoryEntry(), RepositoryEntryManagedFlag.editcontent);
boolean readOnly = uce.isCourseReadOnly(); boolean readOnly = uce.isCourseReadOnly();
editLink = LinkFactory.createToolLink("edit.cmd", translate("command.openeditor"), this, "o_icon_courseeditor"); editLink = LinkFactory.createToolLink("edit.cmd", translate("command.openeditor"), this, "o_icon_courseeditor");
......
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