diff --git a/blocks/admin/block_admin.php b/blocks/admin/block_admin.php
index 394ee7b30e8..d7b5d6469a5 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?