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