From: skodak Date: Mon, 18 Sep 2006 09:58:22 +0000 (+0000) Subject: new metacourse fixes for admin block X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=a7a54c3ba170c6b98c8044e2edf889bc9b1e69a3;p=moodle.git new metacourse fixes for admin block --- diff --git a/blocks/admin/block_admin.php b/blocks/admin/block_admin.php index c2379b49a8..e268678afb 100644 --- a/blocks/admin/block_admin.php +++ b/blocks/admin/block_admin.php @@ -61,10 +61,18 @@ class block_admin extends block_list { $this->content->items[]=''.get_string('assignroles', 'role').''; $this->content->icons[]=''; - if ($course->metacourse) { + } + + /// Manage metacourses + if ($course->metacourse) { + if (has_capability('moodle/course:managemetacourses', $context)) { $strchildcourses = get_string('childcourses'); $this->content->items[]=''.$strchildcourses.''; $this->content->icons[]=''; + } else if (has_capability('moodle/role:assign', $context)) { + $strchildcourses = get_string('childcourses'); + $this->content->items[]=''.$strchildcourses.''; + $this->content->icons[]=''; } }