diff --git a/cohort/index.php b/cohort/index.php index e08985b2cd62a..0f7d2fa0fbd0e 100644 --- a/cohort/index.php +++ b/cohort/index.php @@ -53,7 +53,8 @@ $strcohorts = get_string('cohorts', 'cohort'); -if ($category) { +if ($category) { + $PAGE->set_pagelayout('admin'); $PAGE->set_context($context); $PAGE->set_url('/cohort/index.php', array('contextid'=>$context->id)); $PAGE->set_title($strcohorts); diff --git a/lib/navigationlib.php b/lib/navigationlib.php index 9fbdf695b5176..64329965706ef 100644 --- a/lib/navigationlib.php +++ b/lib/navigationlib.php @@ -3439,6 +3439,12 @@ protected function load_category_settings() { $url = new moodle_url('/'.$CFG->admin.'/roles/check.php', array('contextid'=>$this->context->id)); $categorynode->add(get_string('checkpermissions', 'role'), $url, self::TYPE_SETTING); } + + // Cohorts + if (has_capability('moodle/cohort:manage', $this->context) or has_capability('moodle/cohort:view', $this->context)) { + $categorynode->add(get_string('cohorts', 'cohort'), new moodle_url('/cohort/index.php', array('contextid' => $this->context->id))); + } + // Manage filters if (has_capability('moodle/filter:manage', $this->context) && count(filter_get_available_in_context($this->context))>0) { $url = new moodle_url('/filter/manage.php', array('contextid'=>$this->context->id));