title = get_string('people');
$this->content_type = BLOCK_TYPE_LIST;
$this->version = 2004052600;
}
function get_content() {
global $USER, $CFG;
if ($this->content !== NULL) {
return $this->content;
}
if (empty($this->instance)) {
$this->content = '';
return $this->content;
}
$this->content = new stdClass;
$this->content->items = array();
$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 && isteacher()) || isteacher(SITEID)) {
$this->content->items[]=''.get_string('participants').'';
$this->content->icons[]='
';
}
if ($course->groupmode || !$course->groupmodeforce) {
if ($course->groupmode == VISIBLEGROUPS or isteacheredit($this->instance->pageid)) {
$this->content->items[]=''.$strgroups.'';
$this->content->icons[]='
';
} else if ($course->groupmode == SEPARATEGROUPS and $course->groupmodeforce) {
// Show nothing
} else if ($currentgroup = get_current_group($this->instance->pageid)) {
$this->content->items[]=''.$strgroupmy.'';
$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;
}
}
?>