From: moodler Date: Tue, 31 Jul 2007 13:51:07 +0000 (+0000) Subject: Reordered the list a bit X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=60e2592702256fb3abe0461007be9877ff2afe26;p=moodle.git Reordered the list a bit --- diff --git a/blocks/admin/block_admin.php b/blocks/admin/block_admin.php index 394ee7b30e..d7b5d6469a 100644 --- a/blocks/admin/block_admin.php +++ b/blocks/admin/block_admin.php @@ -61,7 +61,6 @@ class block_admin extends block_list { $this->content->icons[]=''; } - /// Assign roles to the course if (has_capability('moodle/role:assign', $context) && ($course->id!==SITEID)) { @@ -70,6 +69,26 @@ class block_admin extends block_list { } + /// View course grades (or just your own grades, same link) + if ((has_capability('moodle/grade:viewall', $context) or + (has_capability('moodle/grade:view', $context) && $course->showgrades)) && ($course->id!==SITEID)) { + $this->content->items[]=''.get_string('grades').''; + $this->content->icons[]=''; + } + + /// Course outcomes + if (has_capability('moodle/course:update', $context) && ($course->id!==SITEID)) { + $this->content->items[]=''.get_string('outcomes', 'grades').''; + $this->content->icons[]=''; //TODO: add outcomes icon + } + + /// Manage scales + if (has_capability('moodle/course:managescales', $context) && ($course->id!==SITEID)) { + $this->content->items[]=''.get_string('scales').''; + $this->content->icons[]=''; + } + + /// Manage metacourses if ($course->metacourse) { if (has_capability('moodle/course:managemetacourse', $context)) { @@ -129,12 +148,6 @@ class block_admin extends block_list { $this->content->icons[]=''; } - /// Manage scales - if (has_capability('moodle/course:managescales', $context) && ($course->id!==SITEID)) { - $this->content->items[]=''.get_string('scales').''; - $this->content->icons[]=''; - } - /// Manage files if (has_capability('moodle/course:managefiles', $context) && ($course->id!==SITEID)) { @@ -155,19 +168,7 @@ class block_admin extends block_list { $this->content->icons[] = ''; } - /// Used outcomes - if (has_capability('moodle/course:update', $context) && ($course->id!==SITEID)) { - $this->content->items[]=''.get_string('outcomes', 'grades').''; - $this->content->icons[]=''; //TODO: add outcomes icon - } - - /// View course grades (or just your own grades, same link) - if ((has_capability('moodle/grade:viewall', $context) or - (has_capability('moodle/grade:view', $context) && $course->showgrades)) && ($course->id!==SITEID)) { - $this->content->items[]=''.get_string('grades').''; - $this->content->icons[]=''; - } - + /// Unenrol link if (empty($course->metacourse) && ($course->id!==SITEID)) { if (has_capability('moodle/legacy:guest', $context, NULL, false)) { // Are a guest now $this->content->items[]=''.get_string('enrolme', '', format_string($course->shortname)).''; @@ -178,6 +179,7 @@ class block_admin extends block_list { } } + /// Should the following two be in this block?