diff --git a/blocks/admin/block_admin.php b/blocks/admin/block_admin.php
index f8b49ead754..2a7338364b4 100644
--- a/blocks/admin/block_admin.php
+++ b/blocks/admin/block_admin.php
@@ -77,6 +77,8 @@ class block_admin extends block_list {
$course = get_record('course', 'id', $this->instance->pageid);
+
+
if (isteacher($this->instance->pageid)) {
$isteacheredit = isteacheredit($this->instance->pageid);
@@ -92,6 +94,17 @@ class block_admin extends block_list {
$this->content->items[]=''.get_string('settings').'';
$this->content->icons[]='
';
+
+ $fullname = fullname($USER, true);
+ $editmyprofile = ''.get_string('editmyprofile').'';
+ if (empty($USER->description)) {
+ $this->content->items[]= $editmyprofile." ";
+ } else {
+ $this->content->items[]= $editmyprofile;
+ }
+ $this->content->icons[]='
';
+
+
if (iscreator() || !empty($CFG->teacherassignteachers)) {
if (!$course->teachers) {
$course->teachers = get_string('defaultcourseteachers');
@@ -106,11 +119,16 @@ class block_admin extends block_list {
if (!$course->metacourse) {
$this->content->items[]=''.$course->students.'';
$this->content->icons[]='
';
- }
- else {
+ } else {
$this->content->items[]=''.$course->students.'';
$this->content->icons[]='
';
}
+ if ($course->groupmode || !$course->groupmodeforce) {
+ $strgroups = get_string('groups');
+ $this->content->items[]=''.$strgroups.'';
+ $this->content->icons[]='
';
+ }
+
$this->content->items[]=''.get_string('backup').'';
$this->content->icons[]='
';
@@ -153,6 +171,17 @@ class block_admin extends block_list {
$this->content->items[]=''.get_string('activityreport').'';
$this->content->icons[]='
';
}
+
+ $fullname = fullname($USER, true);
+ $editmyprofile = ''.get_string('editmyprofile').'';
+ if (empty($USER->description)) {
+ $this->content->items[]= $editmyprofile." ";
+ } else {
+ $this->content->items[]= $editmyprofile;
+ }
+ $this->content->icons[]='
';
+
if (is_internal_auth()) {
$this->content->items[]=''.get_string('changepassword').'';
$this->content->icons[]='
';
diff --git a/blocks/participants/block_participants.php b/blocks/participants/block_participants.php
index d3563099342..1465368246e 100644
--- a/blocks/participants/block_participants.php
+++ b/blocks/participants/block_participants.php
@@ -22,33 +22,18 @@ class block_participants extends block_list {
$this->content->icons = array();
$this->content->footer = '';
- $strgroups = get_string('groups');
- $strgroupmy = get_string('groupmy');
- $course = get_record('course', 'id', $this->instance->pageid);
+ if ($this->instance->pageid != SITEID ||
+ $CFG->showsiteparticipantslist > 1 ||
+ ($CFG->showsiteparticipantslist == 1 && isteacherinanycourse()) ||
+ isteacher(SITEID)) {
+
+ $this->content->items[] = ''.get_string('participants').'';
+ $this->content->icons[] = '
';
- if ($this->instance->pageid != SITEID || $CFG->showsiteparticipantslist > 1 || ($CFG->showsiteparticipantslist == 1 && isteacherinanycourse()) || isteacher(SITEID)) {
- $this->content->items[]=''.get_string('participants').'';
- $this->content->icons[]='
';
}
- if ($course->groupmode || !$course->groupmodeforce) {
- if (isteacheredit($this->instance->pageid)) {
- $this->content->items[]=''.$strgroups.'';
- $this->content->icons[]='
';
- }
- }
-
- if (!empty($USER->id) and !isguest()) {
- $fullname = fullname($USER, true);
- $editmyprofile = ''.get_string('editmyprofile').'';
- if ($USER->description) {
- $this->content->items[]= $editmyprofile;
- } else {
- $this->content->items[]= $editmyprofile." ";
- }
- $this->content->icons[]='
';
- }
return $this->content;
}