diff --git a/TeachUOS.class.php b/TeachUOS.class.php index 371e43de12c843af1175bed424f50cb709d84792..4a40d55db7b3c79c4695f019aabd0ee13e58f18a 100644 --- a/TeachUOS.class.php +++ b/TeachUOS.class.php @@ -33,6 +33,16 @@ class TeachUOS extends StudipPlugin implements ); $navigation->addSubNavigation("teachUOS", $teachUOS); } + + // more setup if this plugin is active in this course + $contextId = \Context::getId(); + if (\Context::getType() === \Context::COURSE && $this->isActivated($contextId)) { + if (!$GLOBALS['perm']->have_studip_perm('tutor', $contextId)) { + if (Navigation::hasItem('/course/courseware')) { + Navigation::removeItem('/course/courseware'); + } + } + } } /**