title = get_string('adminbookmarks');
$this->version = 2007101509;
}
function applicable_formats() {
if (has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM))) {
return array('all' => true);
} else {
return array('site' => true);
}
}
function preferred_width() {
return 210;
}
function create_item($visiblename,$link,$icon) {
$this->tempcontent .= ' ' . $visiblename . '
' . "\n";
}
function get_content() {
global $CFG, $USER, $PAGE;
if ($this->content !== NULL) {
return $this->content;
}
$this->content = new stdClass;
$this->content->text = '';
if (get_user_preferences('admin_bookmarks')) {
// this is expensive! Only require when bookmakrs exist..
require_once($CFG->libdir.'/adminlib.php');
$adminroot =& admin_get_root(false, false); // settings not required - only pages
$bookmarks = explode(',', get_user_preferences('admin_bookmarks'));
// hmm... just a liiitle (potentially) processor-intensive
// (recall that $adminroot->locate is a huge recursive call... and we're calling it repeatedly here
/// Accessibility: markup as a list.
$this->content->text .= '