diff --git a/blocks/admin/block_admin.php b/blocks/admin/block_admin.php
index 4284cc3024a..23f31d93df8 100644
--- a/blocks/admin/block_admin.php
+++ b/blocks/admin/block_admin.php
@@ -50,7 +50,7 @@ class block_admin extends block_list {
/// Course editing on/off
if (has_capability('moodle/course:update', $context) && ($course->id!==SITEID)) {
- $this->content->icons[]='';
+ $this->content->icons[]='
';
if (isediting($this->instance->pageid)) {
$this->content->items[]=''.get_string('turneditingoff').'';
} else {
@@ -58,7 +58,7 @@ class block_admin extends block_list {
}
$this->content->items[]=''.get_string('settings').'';
- $this->content->icons[]='
';
+ $this->content->icons[]='
';
}
@@ -66,7 +66,7 @@ class block_admin extends block_list {
if (has_capability('moodle/role:assign', $context)) {
$this->content->items[]=''.get_string('assignroles', 'role').'';
- $this->content->icons[]='
';
+ $this->content->icons[]='
';
}
@@ -75,11 +75,11 @@ class block_admin extends block_list {
if (has_capability('moodle/course:managemetacourse', $context)) {
$strchildcourses = get_string('childcourses');
$this->content->items[]=''.$strchildcourses.'';
- $this->content->icons[]='
';
+ $this->content->icons[]='
';
} else if (has_capability('moodle/role:assign', $context)) {
$strchildcourses = get_string('childcourses');
$this->content->items[]=''.$strchildcourses.'';
- $this->content->icons[]='
';
+ $this->content->icons[]='
';
}
}
@@ -89,57 +89,57 @@ class block_admin extends block_list {
if (($course->groupmode || !$course->groupmodeforce) && has_capability('moodle/course:managegroups', $context) && ($course->id!==SITEID)) {
$strgroups = get_string('groups');
$this->content->items[]=''.$strgroups.'';
- $this->content->icons[]='
';
+ $this->content->icons[]='
';
}
/// Backup this course
if (has_capability('moodle/site:backup', $context)) {
$this->content->items[]=''.get_string('backup').'';
- $this->content->icons[]='
';
+ $this->content->icons[]='
';
}
/// Restore to this course
if (has_capability('moodle/site:restore', $context)) {
$this->content->items[]=''.get_string('restore').'';
- $this->content->icons[]='
';
+ $this->content->icons[]='
';
}
/// Import data from other courses
if (has_capability('moodle/site:import', $context) && ($course->id!==SITEID)) {
$this->content->items[]=''.get_string('import').'';
- $this->content->icons[]='
';
+ $this->content->icons[]='
';
}
/// Reset this course
if (has_capability('moodle/course:reset', $context) && ($course->id!==SITEID)) {
$this->content->items[]=''.get_string('reset').'';
- $this->content->icons[]='
';
+ $this->content->icons[]='
';
}
/// View course reports
if (has_capability('moodle/site:viewreports', $context) && ($course->id!==SITEID)) {
$this->content->items[]=''.get_string('reports').'';
- $this->content->icons[]='
';
+ $this->content->icons[]='
';
}
/// Manage questions
if (has_capability('moodle/question:manage', $context) && ($course->id!==SITEID)) {
$this->content->items[]=''.get_string('questions', 'quiz').'';
- $this->content->icons[]='
';
+ $this->content->icons[]='
';
}
/// Manage scales
if (has_capability('moodle/course:managescales', $context) && ($course->id!==SITEID)) {
$this->content->items[]=''.get_string('scales').'';
- $this->content->icons[]='
';
+ $this->content->icons[]='
';
}
/// Manage files
if (has_capability('moodle/course:managefiles', $context) && ($course->id!==SITEID)) {
$this->content->items[]=''.get_string('files').'';
- $this->content->icons[]='
';
+ $this->content->icons[]='
';
}
/// Authorize hooks
@@ -152,23 +152,23 @@ class block_admin extends block_list {
}
}
$this->content->items[] = $paymenturl;
- $this->content->icons[] = '
';
+ $this->content->icons[] = '
';
}
/// View course grades (or just your own grades, same link)
if ((has_capability('moodle/course:viewcoursegrades', $context) or
(has_capability('moodle/user:viewusergrades', $context) && $course->showgrades)) && ($course->id!==SITEID)) {
$this->content->items[]=''.get_string('grades').'';
- $this->content->icons[]='
';
+ $this->content->icons[]='
';
}
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', '', $course->shortname).'';
- $this->content->icons[]='
';
+ $this->content->icons[]='
';
} else if (has_capability('moodle/role:unassignself', $context, NULL, false)) { // Have some role
$this->content->items[]=''.get_string('unenrolme', '', $course->shortname).'';
- $this->content->icons[]='
';
+ $this->content->icons[]='
';
}
}
diff --git a/blocks/admin/styles.php b/blocks/admin/styles.php
deleted file mode 100644
index 20de2f1fc89..00000000000
--- a/blocks/admin/styles.php
+++ /dev/null
@@ -1,4 +0,0 @@
-.block_adminblock .content {
- text-align: center;
- padding: 10px;
-}
diff --git a/blocks/admin_tree/block_admin_tree.php b/blocks/admin_tree/block_admin_tree.php
index 48b478d2921..68c01359721 100644
--- a/blocks/admin_tree/block_admin_tree.php
+++ b/blocks/admin_tree/block_admin_tree.php
@@ -81,8 +81,6 @@ class block_admin_tree extends block_base {
$this->open_folder($content->visiblename);
- unset($entries);
-
$entries = array_keys($content->children);
foreach ($entries as $entry) {
@@ -113,8 +111,6 @@ class block_admin_tree extends block_base {
// we need to do this instead of $this->build_tree($adminroot) because the top-level folder
// is redundant (and ideally ignored). (the top-level folder is "administration".)
- unset($entries);
-
$entries = array_keys($adminroot->children);
asort($entries);
diff --git a/blocks/messages/block_messages.php b/blocks/messages/block_messages.php
index 0c22e0d43c8..3d211854155 100644
--- a/blocks/messages/block_messages.php
+++ b/blocks/messages/block_messages.php
@@ -38,15 +38,15 @@ class block_messages extends block_base {
$this->content->text .= '