diff --git a/blocks/admin/block_admin.php b/blocks/admin/block_admin.php
index ddc6f7d5a07..212e77e2a99 100644
--- a/blocks/admin/block_admin.php
+++ b/blocks/admin/block_admin.php
@@ -109,10 +109,7 @@ class block_admin extends block_list {
if (isteacher($this->instance->pageid)) {
- $isteacheredit = isteacheredit($this->instance->pageid);
-
if (has_capability('moodle/course:update', $context)) {
- //if (isteacheredit($this->instance->pageid)) {
$this->content->icons[]='';
if (isediting($this->instance->pageid)) {
$this->content->items[]=''.get_string('turneditingoff').'';
@@ -124,7 +121,7 @@ class block_admin extends block_list {
$this->content->icons[]='';
}
- $fullname = fullname($USER, true);
+ $fullname = fullname($USER, has_capability('moodle/site:viewfullnames', $context));
$editmyprofile = ''.get_string('editmyprofile').'';
if (empty($USER->description)) {
//Accessibility: replace non-standard