if ($blocks[$blockid]->visible) {
$visible = '<a href="blocks.php?hide='.$blockid.'&sesskey='.sesskey().'" title="'.$strhide.'">'.
- '<img src="'.$CFG->pixpath.'/i/hide.gif" class="icon" alt="'.$strhide.'" /></a>';
+ '<img src="'.$OUTPUT->old_icon_url('i/hide') . '" class="icon" alt="'.$strhide.'" /></a>';
} else {
$visible = '<a href="blocks.php?show='.$blockid.'&sesskey='.sesskey().'" title="'.$strshow.'">'.
- '<img src="'.$CFG->pixpath.'/i/show.gif" class="icon" alt="'.$strshow.'" /></a>';
+ '<img src="'.$OUTPUT->old_icon_url('i/show') . '" class="icon" alt="'.$strshow.'" /></a>';
$class = ' class="dimmed_text"'; // Leading space required!
}
if ($blockobject->instance_allow_multiple()) {
if (LANG_DISPLAY_MISSING_LINKS) {
$missingtarget = '<a name="missing'.$missingcounter.'"></a>';
$missingnext = '<a href="#missing'.($missingcounter+1).'">'.
- '<img src="' . $CFG->pixpath . '/t/down.gif" class="iconsmall" alt="'.$strnext.'" /></a>';
+ '<img src="' . $OUTPUT->old_icon_url('t/down') . '" class="iconsmall" alt="'.$strnext.'" /></a>';
$missingprev = '<a href="#missing'.($missingcounter-1).'">'.
- '<img src="' . $CFG->pixpath . '/t/up.gif" class="iconsmall" alt="'.$strprev.'" /></a>';
+ '<img src="' . $OUTPUT->old_icon_url('t/up') . '" class="iconsmall" alt="'.$strprev.'" /></a>';
}
} else {
// the string is translated in the pack being processed
if (LANG_DISPLAY_MISSING_LINKS) {
$missingtarget = '<a name="missing'.$missingcounter.'"></a>';
$missingnext = '<a href="#missing'.($missingcounter+1).'">'.
- '<img src="' . $CFG->pixpath . '/t/down.gif" class="iconsmall" alt="'.$strnext.'" /></a>';
+ '<img src="' . $OUTPUT->old_icon_url('t/down') . '" class="iconsmall" alt="'.$strnext.'" /></a>';
$missingprev = '<a href="#missing'.($missingcounter-1).'">'.
- '<img src="' . $CFG->pixpath . '/t/up.gif" class="iconsmall" alt="'.$strprev.'" /></a>';
+ '<img src="' . $OUTPUT->old_icon_url('t/up') . '" class="iconsmall" alt="'.$strprev.'" /></a>';
}
}
}
print_footer($course);
function print_report_tree($contextid, $contexts, $systemcontext, $fullname) {
- global $CFG;
+ global $CFG, $OUTPUT;
// Only compute lang strings, etc once.
static $stredit = null, $strcheckpermissions, $globalroleassigner, $assignurl, $checkurl;
$strcheck = get_string('checkuserspermissionshere', 'role', $a);
}
echo ' <a title="' . $strgoto . '" href="' . $raurl . '"><img class="iconsmall" src="' .
- $CFG->pixpath . '/t/edit.gif" alt="' . $stredit . '" /></a> ';
+ $OUTPUT->old_icon_url('t/edit') . '" alt="' . $stredit . '" /></a> ';
echo ' <a title="' . $strcheck . '" href="' . $churl . '"><img class="iconsmall" src="' .
- $CFG->pixpath . '/t/preview.gif" alt="' . $strcheckpermissions . '" /></a> ';
+ $OUTPUT->old_icon_url('t/preview') . '" alt="' . $strcheckpermissions . '" /></a> ';
echo "</p>\n";
}
}
}
function get_content() {
- global $CFG, $USER, $DB;
+ global $CFG, $USER, $DB, $OUTPUT;
if ($this->content !== NULL) {
return $this->content;
/// Course editing on/off
if ($course->id !== SITEID and has_capability('moodle/course:update', $context)) {
- $this->content->icons[]='<img src="'.$CFG->pixpath.'/i/edit.gif" class="icon" alt="" />';
+ $this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/edit') . '" class="icon" alt="" />';
if ($this->page->user_is_editing()) {
$this->content->items[]='<a href="view.php?id='.$course->id.'&edit=off&sesskey='.sesskey().'">'.get_string('turneditingoff').'</a>';
} else {
}
$this->content->items[]='<a href="'.$CFG->wwwroot.'/course/edit.php?id='.$course->id.'">'.get_string('settings').'</a>';
- $this->content->icons[]='<img src="'.$CFG->pixpath.'/i/settings.gif" class="icon" alt="" />';
+ $this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/settings') . '" class="icon" alt="" />';
}
/// Assign roles to the course
if ($course->id != SITEID) {
if (has_capability('moodle/role:assign', $context)) {
$this->content->items[]='<a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/roles/assign.php?contextid='.$context->id.'">'.get_string('assignroles', 'role').'</a>';
- $this->content->icons[]='<img src="'.$CFG->pixpath.'/i/roles.gif" class="icon" alt="" />';
+ $this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/roles') . '" class="icon" alt="" />';
} else if (get_overridable_roles($context, ROLENAME_ORIGINAL)) {
$this->content->items[]='<a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/roles/override.php?contextid='.$context->id.'">'.get_string('overridepermissions', 'role').'</a>';
- $this->content->icons[]='<img src="'.$CFG->pixpath.'/i/roles.gif" class="icon" alt="" />';
+ $this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/roles') . '" class="icon" alt="" />';
}
}
if ($reportavailable) {
$this->content->items[]='<a href="'.$CFG->wwwroot.'/grade/report/index.php?id='.$course->id.'">'.get_string('grades').'</a>';
- $this->content->icons[]='<img src="'.$CFG->pixpath.'/i/grades.gif" class="icon" alt="" />';
+ $this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/grades') . '" class="icon" alt="" />';
}
}
if (!empty($CFG->enableoutcomes)) {
if ($course->id!==SITEID and has_capability('moodle/course:update', $context)) {
$this->content->items[]='<a href="'.$CFG->wwwroot.'/grade/edit/outcome/course.php?id='.$course->id.'">'.get_string('outcomes', 'grades').'</a>';
- $this->content->icons[]='<img src="'.$CFG->pixpath.'/i/outcomes.gif" class="icon" alt="" />';
+ $this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/outcomes') . '" class="icon" alt="" />';
}
}
if (has_capability('moodle/course:managemetacourse', $context)) {
$strchildcourses = get_string('childcourses');
$this->content->items[]='<a href="importstudents.php?id='.$course->id.'">'.$strchildcourses.'</a>';
- $this->content->icons[]='<img src="'.$CFG->pixpath.'/i/course.gif" class="icon" alt="" />';
+ $this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/course') . '" class="icon" alt="" />';
} else if (has_capability('moodle/role:assign', $context)) {
$strchildcourses = get_string('childcourses');
$this->content->items[]='<span class="dimmed_text">'.$strchildcourses.'</span>';
- $this->content->icons[]='<img src="'.$CFG->pixpath.'/i/course.gif" class="icon" alt="" />';
+ $this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/course') . '" class="icon" alt="" />';
}
}
if (($course->id!==SITEID) && ($course->groupmode || !$course->groupmodeforce) && has_capability('moodle/course:managegroups', $context)) {
$strgroups = get_string('groups');
$this->content->items[]='<a title="'.$strgroups.'" href="'.$CFG->wwwroot.'/group/index.php?id='.$course->id.'">'.$strgroups.'</a>';
- $this->content->icons[]='<img src="'.$CFG->pixpath.'/i/group.gif" class="icon" alt="" />';
+ $this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/group') . '" class="icon" alt="" />';
}
/// Backup this course
if ($course->id!==SITEID and has_capability('moodle/site:backup', $context)) {
$this->content->items[]='<a href="'.$CFG->wwwroot.'/backup/backup.php?id='.$course->id.'">'.get_string('backup').'</a>';
- $this->content->icons[]='<img src="'.$CFG->pixpath.'/i/backup.gif" class="icon" alt="" />';
+ $this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/backup') . '" class="icon" alt="" />';
}
/// Restore to this course
if ($course->id !== SITEID and has_capability('moodle/site:restore', $context)) {
$this->content->items[]='<a href="'.$CFG->wwwroot.'/files/index.php?id='.$course->id.'&wdir=/backupdata">'.get_string('restore').'</a>';
- $this->content->icons[]='<img src="'.$CFG->pixpath.'/i/restore.gif" class="icon" alt="" />';
+ $this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/restore') . '" class="icon" alt="" />';
}
/// Import data from other courses
if ($course->id !== SITEID and has_capability('moodle/site:import', $context)) {
$this->content->items[]='<a href="'.$CFG->wwwroot.'/course/import.php?id='.$course->id.'">'.get_string('import').'</a>';
- $this->content->icons[]='<img src="'.$CFG->pixpath.'/i/restore.gif" class="icon" alt="" />';
+ $this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/restore') . '" class="icon" alt="" />';
}
/// Reset this course
if ($course->id!==SITEID and has_capability('moodle/course:reset', $context)) {
$this->content->items[]='<a href="'.$CFG->wwwroot.'/course/reset.php?id='.$course->id.'">'.get_string('reset').'</a>';
- $this->content->icons[]='<img src="'.$CFG->pixpath.'/i/return.gif" class="icon" alt="" />';
+ $this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/return') . '" class="icon" alt="" />';
}
/// View course reports
if ($course->id !== SITEID and has_capability('moodle/site:viewreports', $context)) { // basic capability for listing of reports
$this->content->items[]='<a href="'.$CFG->wwwroot.'/course/report.php?id='.$course->id.'">'.get_string('reports').'</a>';
- $this->content->icons[]='<img src="'.$CFG->pixpath.'/i/stats.gif" class="icon" alt="" />';
+ $this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/stats') . '" class="icon" alt="" />';
}
/// Manage questions
if ($questionlink) {
$this->content->items[]='<a href="'.$CFG->wwwroot.'/question/'.$questionlink.
'?courseid='.$course->id.'">'.get_string('questions', 'quiz').'</a>';
- $this->content->icons[]='<img src="'.$CFG->pixpath.'/i/questions.gif" class="icon" alt="" />';
+ $this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/questions') . '" class="icon" alt="" />';
}
}
$editabletypes = repository::get_editable_types($context);
if ($course->id !== SITEID && has_capability('moodle/course:update', $context) && !empty($editabletypes)) {
$this->content->items[]='<a href="'.$CFG->wwwroot.'/repository/manage_instances.php?contextid='.$context->id.'">'.get_string('repositories').'</a>';
- $this->content->icons[]='<img src="'.$CFG->pixpath.'/i/repository.png" alt=""/>';
+ $this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/repository') . '" alt=""/>';
}
/// Manage files
if ($course->id !== SITEID and has_capability('moodle/course:managefiles', $context)) {
$this->content->items[]='<a href="'.$CFG->wwwroot.'/files/index.php?id='.$course->id.'">'.get_string('files').'</a>';
- $this->content->icons[]='<img src="'.$CFG->pixpath.'/i/files.gif" class="icon" alt=""/>';
+ $this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/files') . '" class="icon" alt=""/>';
}
/// Authorize hooks
}
}
$this->content->items[] = $paymenturl;
- $this->content->icons[] = '<img src="'.$CFG->pixpath.'/i/payment.gif" class="icon" alt="" />';
+ $this->content->icons[] = '<img src="'.$OUTPUT->old_icon_url('i/payment') . '" class="icon" alt="" />';
}
/// Unenrol link
if (empty($course->metacourse) && ($course->id!==SITEID)) {
if (has_capability('moodle/legacy:guest', $context, NULL, false)) { // Are a guest now
$this->content->items[]='<a href="'.$CFG->wwwroot.'/course/enrol.php?id='.$course->id.'">'.get_string('enrolme', '', format_string($course->shortname)).'</a>';
- $this->content->icons[]='<img src="'.$CFG->pixpath.'/i/user.gif" class="icon" alt="" />';
+ $this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/user') . '" class="icon" alt="" />';
} else if (has_capability('moodle/role:unassignself', $context, NULL, false) and get_user_roles($context, $USER->id, false)) { // Have some role
$this->content->items[]='<a href="'.$CFG->wwwroot.'/course/unenrol.php?id='.$course->id.'">'.get_string('unenrolme', '', format_string($course->shortname)).'</a>';
- $this->content->icons[]='<img src="'.$CFG->pixpath.'/i/user.gif" class="icon" alt="" />';
+ $this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/user') . '" class="icon" alt="" />';
}
}
/// Link to the user own profile (except guests)
if (!isguestuser() and isloggedin()) {
$this->content->items[]='<a href="'.$CFG->wwwroot.'/user/view.php?id='.$USER->id.'&course='.$course->id.'">'.get_string('profile').'</a>';
- $this->content->icons[]='<img src="'.$CFG->pixpath.'/i/user.gif" alt="" />';
+ $this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/user') . '" alt="" />';
}
return $this->content;
}
function open_folder($visiblename) {
- global $CFG;
+ global $OUTPUT;
$strfolderopened = s(get_string('folderopened'));
$this->tempcontent .= '<div class="depth'.$this->currentdepth.'"><a name="d'.$this->divcounter.'">';
- $this->tempcontent .= '<img id="vh_div'.$this->divcounter.'indicator" src="'.$CFG->pixpath.'/i/open.gif" alt="'.$strfolderopened.'" /> ';
+ $this->tempcontent .= '<img id="vh_div'.$this->divcounter.'indicator" src="'.$OUTPUT->old_icon_url('i/open') . '" alt="'.$strfolderopened.'" /> ';
$this->tempcontent .= $visiblename.'</a></div><div id="vh_div'.$this->divcounter.'">'."\n";
$this->currentdepth++;
$this->divcounter++;
}
function build_tree (&$content) {
- global $CFG;
+ global $CFG, $OUTPUT;
if ($content instanceof admin_settingpage) {
// show hidden pages in tree if hidden page active
if ($content->check_access() and (($content->name == $this->section) or !$content->is_hidden())) {
if ($content->is_hidden()) {
$class .= ' hidden';
}
- $this->create_item($content->visiblename, $CFG->wwwroot.'/'.$CFG->admin.'/settings.php?section='.$content->name,$CFG->pixpath.'/i/item.gif', $class);
+ $this->create_item($content->visiblename, $CFG->wwwroot.'/'.$CFG->admin.'/settings.php?section='.$content->name,$OUTPUT->old_icon_url('i/item'), $class);
}
} else if ($content instanceof admin_externalpage) {
// show hidden pages in tree if hidden page active
if ($content->is_hidden()) {
$class .= ' hidden';
}
- $this->create_item($content->visiblename, $content->url, $CFG->pixpath.'/i/item.gif', $class);
+ $this->create_item($content->visiblename, $content->url, $OUTPUT->old_icon_url('i/item'), $class);
}
} else if ($content instanceof admin_category) {
if ($content->check_access() and !$content->is_hidden()) {
}
function get_remote_courses() {
- global $CFG, $USER;
+ global $CFG, $USER, $OUTPUT;
if (!is_enabled_auth('mnet')) {
// no need to query anything remote related
return;
}
- $icon = '<img src="'.$CFG->pixpath.'/i/mnethost.gif" class="icon" alt="'.get_string('course').'" />';
+ $icon = '<img src="'.$OUTPUT->old_icon_url('i/mnethost') . '" class="icon" alt="'.get_string('course').'" />';
// only for logged in users!
if (!isloggedin() || isguest()) {
}
function get_content() {
- global $CFG;
+ global $CFG, $OUTPUT;
- $calc = $CFG->pixpath.'/i/calc.gif';
+ $calc = $OUTPUT->old_icon_url('i/calc');
$this->content->text = '
<script type="text/javascript">
}
function get_content() {
- global $USER, $CFG, $DB;
+ global $USER, $CFG, $DB, $OUTPUT;
if (!$CFG->messaging) {
return '';
$this->content->text .= '<li class="listentry"><div class="user"><a href="'.$CFG->wwwroot.'/user/view.php?id='.$user->id.'&course='.SITEID.'" title="'.$timeago.'">';
$this->content->text .= print_user_picture($user, SITEID, $user->picture, 0, true, false, '', false);
$this->content->text .= fullname($user).'</a></div>';
- $this->content->text .= '<div class="message"><a href="'.$CFG->wwwroot.'/message/discussion.php?id='.$user->id.'" onclick="this.target=\'message_'.$user->id.'\'; return openpopup(\'/message/discussion.php?id='.$user->id.'\', \'message_'.$user->id.'\', \'menubar=0,location=0,scrollbars,status,resizable,width=400,height=500\', 0);"><img class="iconsmall" src="'.$CFG->pixpath.'/t/message.gif" alt="" /> '.$user->count.'</a>';
+ $this->content->text .= '<div class="message"><a href="'.$CFG->wwwroot.'/message/discussion.php?id='.$user->id.'" onclick="this.target=\'message_'.$user->id.'\'; return openpopup(\'/message/discussion.php?id='.$user->id.'\', \'message_'.$user->id.'\', \'menubar=0,location=0,scrollbars,status,resizable,width=400,height=500\', 0);"><img class="iconsmall" src="'.$OUTPUT->old_icon_url('t/message') . '" alt="" /> '.$user->count.'</a>';
$this->content->text .= '</div></li>';
}
$this->content->text .= '</ul>';
function _title_html() {
- global $CFG;
+ global $OUTPUT;
//Accessibility: validation, can't have <div> inside <h2>, use <span>.
$title = '<div class="title">';
//Theme the buttons using, Admin - Miscellaneous - smartpix.
$strshow = addslashes_js(get_string('showblocka', 'access', strip_tags($this->title)));
$strhide = addslashes_js(get_string('hideblocka', 'access', strip_tags($this->title)));
- $title .= '<input type="image" src="'.$CFG->pixpath.'/t/switch_minus.gif" '.
+ $title .= '<input type="image" src="'.$OUTPUT->old_icon_url('t/switch_minus') . '" '.
'id="togglehide_inst'.$this->instance->id.'" '.
'onclick="elementToggleHide(this, true, function(el) {'.
'return findParentNode(el, \'DIV\', \'sideblock\'); },'.
* @todo complete documenting this function. Define $options.
*/
function _add_edit_controls($options) {
- global $CFG, $USER;
+ global $CFG, $USER, $OUTPUT;
// TODO - temporary hack to get the block context only if it already exists.
global $DB;
$script = $page->url->out(false, array('instanceid' => $this->instance->id, 'sesskey' => sesskey()));
$movebuttons .= '<a class="icon roles" title="'. $this->str->assignroles .'" href="'.$CFG->wwwroot.'/'.$CFG->admin.'/roles/assign.php?contextid='.$context->id.'">' .
- '<img src="'.$CFG->pixpath.'/i/roles.gif" alt="'.$this->str->assignroles.'" /></a>';
+ '<img src="'.$OUTPUT->old_icon_url('i/roles') . '" alt="'.$this->str->assignroles.'" /></a>';
// TODO MDL-19010 fix and re-enable.
if (false && $this->user_can_edit()) {
if ($options & BLOCK_CONFIGURE && $this->user_can_edit()) {
$movebuttons .= '<a class="icon edit" title="'. $this->str->configure .'" href="'.$script.'&blockaction=config">' .
- '<img src="'. $CFG->pixpath .'/t/edit.gif" alt="'. $this->str->configure .'" /></a>';
+ '<img src="'. $OUTPUT->old_icon_url('t/edit') . '" alt="'. $this->str->configure .'" /></a>';
}
if ($this->user_can_addto($page)) {
$movebuttons .= '<a class="icon delete" title="'. $this->str->delete .'" href="'.$script.'&blockaction=delete">' .
- '<img src="'. $CFG->pixpath .'/t/delete.gif" alt="'. $this->str->delete .'" /></a>';
+ '<img src="'. $OUTPUT->old_icon_url('t/delete') . '" alt="'. $this->str->delete .'" /></a>';
}
if ($options & BLOCK_MOVE_LEFT) {
}
if ($options & BLOCK_MOVE_UP) {
$movebuttons .= '<a class="icon up" title="'. $this->str->moveup .'" href="'.$script.'&blockaction=moveup">' .
- '<img src="'. $CFG->pixpath .'/t/up.gif" alt="'. $this->str->moveup .'" /></a>';
+ '<img src="'. $OUTPUT->old_icon_url('t/up') . '" alt="'. $this->str->moveup .'" /></a>';
}
if ($options & BLOCK_MOVE_DOWN) {
$movebuttons .= '<a class="icon down" title="'. $this->str->movedown .'" href="'.$script.'&blockaction=movedown">' .
- '<img src="'. $CFG->pixpath .'/t/down.gif" alt="'. $this->str->movedown .'" /></a>';
+ '<img src="'. $OUTPUT->old_icon_url('t/down') . '" alt="'. $this->str->movedown .'" /></a>';
}
if ($options & BLOCK_MOVE_RIGHT) {
$movebuttons .= '<a class="icon right" title="'. $this->str->moveright .'" href="'.$script.'&blockaction=moveright">' .
function has_config() {return true;}
function get_content() {
- global $USER, $CFG, $DB;
+ global $USER, $CFG, $DB, $OUTPUT;
if ($this->content !== NULL) {
return $this->content;
}
if ($canshowicon and ($USER->id != $user->id) and $user->username != 'guest') { // Only when logged in and messaging active etc
$this->content->text .= '<div class="message"><a title="'.get_string('messageselectadd').'" href="'.$CFG->wwwroot.'/message/discussion.php?id='.$user->id.'" onclick="this.target=\'message_'.$user->id.'\';return openpopup(\'/message/discussion.php?id='.$user->id.'\', \'message_'.$user->id.'\', \'menubar=0,location=0,scrollbars,status,resizable,width=400,height=500\', 0);">'
- .'<img class="iconsmall" src="'.$CFG->pixpath.'/t/message.gif" alt="'. get_string('messageselectadd') .'" /></a></div>';
+ .'<img class="iconsmall" src="'.$OUTPUT->old_icon_url('t/message') . '" alt="'. get_string('messageselectadd') .'" /></a></div>';
}
$this->content->text .= "</li>\n";
}
function get_content() {
- global $CFG;
+ global $CFG, $OUTPUT;
if (empty($this->instance)) {
$this->content = '';
$this->content->items[] = '<a title="'.get_string('listofallpeople').'" href="'.
$CFG->wwwroot.'/user/index.php?contextid='.$currentcontext->id.'">'.get_string('participants').'</a>';
- $this->content->icons[] = '<img src="'.$CFG->pixpath.'/i/users.gif" class="icon" alt="" />';
+ $this->content->icons[] = '<img src="'.$OUTPUT->old_icon_url('i/users') . '" class="icon" alt="" />';
return $this->content;
}
}
function get_content() {
- global $USER, $CFG, $DB;
+ global $USER, $CFG, $DB, $OUTPUT;
if ($this->content !== NULL) {
return $this->content;
$editbuttons = '';
if ($ismoving) {
- $this->content->icons[] = '<img src="'.$CFG->pixpath.'/t/move.gif" class="iconsmall" alt="" />';
+ $this->content->icons[] = '<img src="'.$OUTPUT->old_icon_url('t/move') . '" class="iconsmall" alt="" />';
$this->content->items[] = $USER->activitycopyname.' (<a href="'.$CFG->wwwroot.'/course/mod.php?cancelcopy=true&sesskey='.sesskey().'">'.$strcancel.'</a>)';
}
}
function get_content() {
- global $USER, $CFG, $DB;
+ global $USER, $CFG, $DB, $OUTPUT;
if ($this->content !== NULL) {
return $this->content;
$editbuttons = '';
if ($ismoving) {
- $this->content->icons[] = ' <img align="bottom" src="'.$CFG->pixpath.'/t/move.gif" class="iconsmall" alt="" />';
+ $this->content->icons[] = ' <img align="bottom" src="'.$OUTPUT->old_icon_url('t/move') . '" class="iconsmall" alt="" />';
$this->content->items[] = $USER->activitycopyname.' (<a href="'.$CFG->wwwroot.'/course/mod.php?cancelcopy=true&sesskey='.sesskey().'">'.$strcancel.'</a>)';
}
// needs some hacking to rss/file.php
function blog_rss_print_link($filtertype, $filterselect, $tagid=0, $tooltiptext='') {
- global $CFG, $USER;
+ global $CFG, $USER, $OUTPUT;
if (empty($USER->id)) {
$userid = 1;
}
$path .= '/rss.xml';
- $rsspix = $CFG->pixpath .'/i/rss.gif';
+ $rsspix = $OUTPUT->old_icon_url('i/rss');
require_once($CFG->libdir.'/filelib.php');
$path = get_file_url($path, null, 'rssfile');
function calendar_get_mini($courses, $groups, $users, $cal_month = false, $cal_year = false) {
- global $CFG, $USER;
+ global $CFG, $USER, $OUTPUT;
$display = new stdClass;
$display->minwday = get_user_preferences('calendar_startwday', CALENDAR_STARTING_WEEKDAY);
$popupalt = $event->modulename;
} else if ($event->courseid == SITEID) { // Site event
- $popupicon = $CFG->pixpath.'/c/site.gif';
+ $popupicon = $OUTPUT->old_icon_url('c/site');
$popupalt = '';
} else if ($event->courseid != 0 && $event->courseid != SITEID && $event->groupid == 0) { // Course event
- $popupicon = $CFG->pixpath.'/c/course.gif';
+ $popupicon = $OUTPUT->old_icon_url('c/course');
$popupalt = '';
} else if ($event->groupid) { // Group event
- $popupicon = $CFG->pixpath.'/c/group.gif';
+ $popupicon = $OUTPUT->old_icon_url('c/group');
$popupalt = '';
} else if ($event->userid) { // User event
- $popupicon = $CFG->pixpath.'/c/user.gif';
+ $popupicon = $OUTPUT->old_icon_url('c/user');
$popupalt = '';
}
$popupcontent .= '<div><img class="icon" src="'.$popupicon.'" alt="'.$popupalt.'" /><a href="'.$dayhref.'#event_'.$event->id.'">'.format_string($event->name, true).'</a></div>';
}
function calendar_add_event_metadata($event) {
- global $CFG;
+ global $CFG, $OUTPUT;
//Support multilang in event->name
$event->name = format_string($event->name,true);
} else if($event->courseid == SITEID) { // Site event
- $event->icon = '<img height="16" width="16" src="'.$CFG->pixpath.'/c/site.gif" alt="'.get_string('globalevent', 'calendar').'" style="vertical-align: middle;" />';
+ $event->icon = '<img height="16" width="16" src="'.$OUTPUT->old_icon_url('c/site') . '" alt="'.get_string('globalevent', 'calendar').'" style="vertical-align: middle;" />';
$event->cssclass = 'event_global';
} else if($event->courseid != 0 && $event->courseid != SITEID && $event->groupid == 0) { // Course event
calendar_get_course_cached($coursecache, $event->courseid);
- $event->icon = '<img height="16" width="16" src="'.$CFG->pixpath.'/c/course.gif" alt="'.get_string('courseevent', 'calendar').'" style="vertical-align: middle;" />';
+ $event->icon = '<img height="16" width="16" src="'.$OUTPUT->old_icon_url('c/course') . '" alt="'.get_string('courseevent', 'calendar').'" style="vertical-align: middle;" />';
$event->courselink = '<a href="'.$CFG->wwwroot.'/course/view.php?id='.$event->courseid.'">'.$coursecache[$event->courseid]->fullname.'</a>';
$event->cssclass = 'event_course';
} else if ($event->groupid) { // Group event
- $event->icon = '<img height="16" width="16" src="'.$CFG->pixpath.'/c/group.gif" alt="'.get_string('groupevent', 'calendar').'" style="vertical-align: middle;" />';
+ $event->icon = '<img height="16" width="16" src="'.$OUTPUT->old_icon_url('c/group') . '" alt="'.get_string('groupevent', 'calendar').'" style="vertical-align: middle;" />';
$event->cssclass = 'event_group';
} else if($event->userid) { // User event
- $event->icon = '<img height="16" width="16" src="'.$CFG->pixpath.'/c/user.gif" alt="'.get_string('userevent', 'calendar').'" style="vertical-align: middle;" />';
+ $event->icon = '<img height="16" width="16" src="'.$OUTPUT->old_icon_url('c/user') . '" alt="'.get_string('userevent', 'calendar').'" style="vertical-align: middle;" />';
$event->cssclass = 'event_user';
}
return $event;
}
function calendar_print_event($event) {
- global $CFG, $USER;
+ global $CFG, $USER, $OUTPUT;
static $strftimetime;
$deletelink = ''; // deleting activities directly from calendar is dangerous/confusing - see MDL-11843
}
echo ' <a href="'.$editlink.'"><img
- src="'.$CFG->pixpath.'/t/edit.gif" alt="'.get_string('tt_editevent', 'calendar').'"
+ src="'.$OUTPUT->old_icon_url('t/edit') . '" alt="'.get_string('tt_editevent', 'calendar').'"
title="'.get_string('tt_editevent', 'calendar').'" /></a>';
if ($deletelink) {
echo ' <a href="'.$deletelink.'"><img
- src="'.$CFG->pixpath.'/t/delete.gif" alt="'.get_string('tt_deleteevent', 'calendar').'"
+ src="'.$OUTPUT->old_icon_url('t/delete') . '" alt="'.get_string('tt_deleteevent', 'calendar').'"
title="'.get_string('tt_deleteevent', 'calendar').'" /></a>';
}
echo '</div>';
}
function calendar_filter_controls($type, $vars = NULL, $course = NULL, $courses = NULL) {
- global $CFG, $SESSION, $USER;
+ global $CFG, $SESSION, $USER, $OUTPUT;
$groupevents = true;
$getvars = '';
$content .= '<tr>';
if($SESSION->cal_show_global) {
- $content .= '<td class="eventskey event_global" style="width: 11px;"><img src="'.$CFG->pixpath.'/t/hide.gif" class="iconsmall" alt="'.get_string('hide').'" title="'.get_string('tt_hideglobal', 'calendar').'" style="cursor:pointer" onclick="location.href='."'".CALENDAR_URL.'set.php?var=showglobal'.$getvars."'".'" /></td>';
+ $content .= '<td class="eventskey event_global" style="width: 11px;"><img src="'.$OUTPUT->old_icon_url('t/hide') . '" class="iconsmall" alt="'.get_string('hide').'" title="'.get_string('tt_hideglobal', 'calendar').'" style="cursor:pointer" onclick="location.href='."'".CALENDAR_URL.'set.php?var=showglobal'.$getvars."'".'" /></td>';
$content .= '<td><a href="'.CALENDAR_URL.'set.php?var=showglobal'.$getvars.'" title="'.get_string('tt_hideglobal', 'calendar').'">'.get_string('global', 'calendar').'</a></td>'."\n";
} else {
- $content .= '<td style="width: 11px;"><img src="'.$CFG->pixpath.'/t/show.gif" class="iconsmall" alt="'.get_string('show').'" title="'.get_string('tt_showglobal', 'calendar').'" style="cursor:pointer" onclick="location.href='."'".CALENDAR_URL.'set.php?var=showglobal'.$getvars."'".'" /></td>';
+ $content .= '<td style="width: 11px;"><img src="'.$OUTPUT->old_icon_url('t/show') . '" class="iconsmall" alt="'.get_string('show').'" title="'.get_string('tt_showglobal', 'calendar').'" style="cursor:pointer" onclick="location.href='."'".CALENDAR_URL.'set.php?var=showglobal'.$getvars."'".'" /></td>';
$content .= '<td><a href="'.CALENDAR_URL.'set.php?var=showglobal'.$getvars.'" title="'.get_string('tt_showglobal', 'calendar').'">'.get_string('global', 'calendar').'</a></td>'."\n";
}
if($SESSION->cal_show_course) {
- $content .= '<td class="eventskey event_course" style="width: 11px;"><img src="'.$CFG->pixpath.'/t/hide.gif" class="iconsmall" alt="'.get_string('hide').'" title="'.get_string('tt_hidecourse', 'calendar').'" style="cursor:pointer" onclick="location.href='."'".CALENDAR_URL.'set.php?var=showcourses'.$getvars."'".'" /></td>';
+ $content .= '<td class="eventskey event_course" style="width: 11px;"><img src="'.$OUTPUT->old_icon_url('t/hide') . '" class="iconsmall" alt="'.get_string('hide').'" title="'.get_string('tt_hidecourse', 'calendar').'" style="cursor:pointer" onclick="location.href='."'".CALENDAR_URL.'set.php?var=showcourses'.$getvars."'".'" /></td>';
$content .= '<td><a href="'.CALENDAR_URL.'set.php?var=showcourses'.$getvars.'" title="'.get_string('tt_hidecourse', 'calendar').'">'.get_string('course', 'calendar').'</a></td>'."\n";
} else {
- $content .= '<td style="width: 11px;"><img src="'.$CFG->pixpath.'/t/show.gif" class="iconsmall" alt="'.get_string('hide').'" title="'.get_string('tt_showcourse', 'calendar').'" style="cursor:pointer" onclick="location.href='."'".CALENDAR_URL.'set.php?var=showcourses'.$getvars."'".'" /></td>';
+ $content .= '<td style="width: 11px;"><img src="'.$OUTPUT->old_icon_url('t/show') . '" class="iconsmall" alt="'.get_string('hide').'" title="'.get_string('tt_showcourse', 'calendar').'" style="cursor:pointer" onclick="location.href='."'".CALENDAR_URL.'set.php?var=showcourses'.$getvars."'".'" /></td>';
$content .= '<td><a href="'.CALENDAR_URL.'set.php?var=showcourses'.$getvars.'" title="'.get_string('tt_showcourse', 'calendar').'">'.get_string('course', 'calendar').'</a></td>'."\n";
}
if($groupevents) {
// This course MIGHT have group events defined, so show the filter
if($SESSION->cal_show_groups) {
- $content .= '<td class="eventskey event_group" style="width: 11px;"><img src="'.$CFG->pixpath.'/t/hide.gif" class="iconsmall" alt="'.get_string('hide').'" title="'.get_string('tt_hidegroups', 'calendar').'" style="cursor:pointer" onclick="location.href='."'".CALENDAR_URL.'set.php?var=showgroups'.$getvars."'".'" /></td>';
+ $content .= '<td class="eventskey event_group" style="width: 11px;"><img src="'.$OUTPUT->old_icon_url('t/hide') . '" class="iconsmall" alt="'.get_string('hide').'" title="'.get_string('tt_hidegroups', 'calendar').'" style="cursor:pointer" onclick="location.href='."'".CALENDAR_URL.'set.php?var=showgroups'.$getvars."'".'" /></td>';
$content .= '<td><a href="'.CALENDAR_URL.'set.php?var=showgroups'.$getvars.'" title="'.get_string('tt_hidegroups', 'calendar').'">'.get_string('group', 'calendar').'</a></td>'."\n";
} else {
- $content .= '<td style="width: 11px;"><img src="'.$CFG->pixpath.'/t/show.gif" class="iconsmall" alt="'.get_string('show').'" title="'.get_string('tt_showgroups', 'calendar').'" style="cursor:pointer" onclick="location.href='."'".CALENDAR_URL.'set.php?var=showgroups'.$getvars."'".'" /></td>';
+ $content .= '<td style="width: 11px;"><img src="'.$OUTPUT->old_icon_url('t/show') . '" class="iconsmall" alt="'.get_string('show').'" title="'.get_string('tt_showgroups', 'calendar').'" style="cursor:pointer" onclick="location.href='."'".CALENDAR_URL.'set.php?var=showgroups'.$getvars."'".'" /></td>';
$content .= '<td><a href="'.CALENDAR_URL.'set.php?var=showgroups'.$getvars.'" title="'.get_string('tt_showgroups', 'calendar').'">'.get_string('group', 'calendar').'</a></td>'."\n";
}
} else {
$content .= '<td style="width: 11px;"></td><td> </td>'."\n";
}
if($SESSION->cal_show_user) {
- $content .= '<td class="eventskey event_user" style="width: 11px;"><img src="'.$CFG->pixpath.'/t/hide.gif" class="iconsmall" alt="'.get_string('hide').'" title="'.get_string('tt_hideuser', 'calendar').'" style="cursor:pointer" onclick="location.href='."'".CALENDAR_URL.'set.php?var=showuser'.$getvars."'".'" /></td>';
+ $content .= '<td class="eventskey event_user" style="width: 11px;"><img src="'.$OUTPUT->old_icon_url('t/hide') . '" class="iconsmall" alt="'.get_string('hide').'" title="'.get_string('tt_hideuser', 'calendar').'" style="cursor:pointer" onclick="location.href='."'".CALENDAR_URL.'set.php?var=showuser'.$getvars."'".'" /></td>';
$content .= '<td><a href="'.CALENDAR_URL.'set.php?var=showuser'.$getvars.'" title="'.get_string('tt_hideuser', 'calendar').'">'.get_string('user', 'calendar').'</a></td>'."\n";
} else {
- $content .= '<td style="width: 11px;"><img src="'.$CFG->pixpath.'/t/show.gif" class="iconsmall" alt="'.get_string('show').'" title="'.get_string('tt_showuser', 'calendar').'" style="cursor:pointer" onclick="location.href='."'".CALENDAR_URL.'set.php?var=showuser'.$getvars."'".'" /></td>';
+ $content .= '<td style="width: 11px;"><img src="'.$OUTPUT->old_icon_url('t/show') . '" class="iconsmall" alt="'.get_string('show').'" title="'.get_string('tt_showuser', 'calendar').'" style="cursor:pointer" onclick="location.href='."'".CALENDAR_URL.'set.php?var=showuser'.$getvars."'".'" /></td>';
$content .= '<td><a href="'.CALENDAR_URL.'set.php?var=showuser'.$getvars.'" title="'.get_string('tt_showuser', 'calendar').'">'.get_string('user', 'calendar').'</a></td>'."\n";
}
}
$usernameencoded = urlencode($USER->username);
echo "<a href=\"export_execute.php?preset_what=all&preset_time=recentupcoming&username=$usernameencoded&authtoken=$authtoken\">"
- .'<img src="'.$CFG->pixpath.'/i/ical.gif" height="14" width="36" '
+ .'<img src="'.$OUTPUT->old_icon_url('i/ical') . '" height="14" width="36" '
.'alt="'.get_string('ical', 'calendar').'" '
.'title="'.get_string('quickdownloadcalendar', 'calendar').'" />'
.'</a>';
echo '<td>';
if (has_capability('moodle/course:update', $coursecontext)) {
echo '<a title="'.$strsettings.'" href="'.$CFG->wwwroot.'/course/edit.php?id='.$acourse->id.'">'.
- '<img src="'.$CFG->pixpath.'/t/edit.gif" class="iconsmall" alt="'.$stredit.'" /></a> ';
+ '<img src="'.$OUTPUT->old_icon_url('t/edit') . '" class="iconsmall" alt="'.$stredit.'" /></a> ';
} else {
echo $spacer;
}
// role assignment link
if (has_capability('moodle/role:assign', $coursecontext)) {
echo '<a title="'.get_string('assignroles', 'role').'" href="'.$CFG->wwwroot.'/'.$CFG->admin.'/roles/assign.php?contextid='.$coursecontext->id.'">'.
- '<img src="'.$CFG->pixpath.'/i/roles.gif" class="iconsmall" alt="'.get_string('assignroles', 'role').'" /></a> ';
+ '<img src="'.$OUTPUT->old_icon_url('i/roles') . '" class="iconsmall" alt="'.get_string('assignroles', 'role').'" /></a> ';
} else {
echo $spacer;
}
if (can_delete_course($acourse->id)) {
echo '<a title="'.$strdelete.'" href="delete.php?id='.$acourse->id.'">'.
- '<img src="'.$CFG->pixpath.'/t/delete.gif" class="iconsmall" alt="'.$strdelete.'" /></a> ';
+ '<img src="'.$OUTPUT->old_icon_url('t/delete') . '" class="iconsmall" alt="'.$strdelete.'" /></a> ';
} else {
echo $spacer;
}
if (!empty($acourse->visible)) {
echo '<a title="'.$strhide.'" href="category.php?id='.$category->id.'&page='.$page.
'&perpage='.$perpage.'&hide='.$acourse->id.'&sesskey='.sesskey().'">'.
- '<img src="'.$CFG->pixpath.'/t/hide.gif" class="iconsmall" alt="'.$strhide.'" /></a> ';
+ '<img src="'.$OUTPUT->old_icon_url('t/hide') . '" class="iconsmall" alt="'.$strhide.'" /></a> ';
} else {
echo '<a title="'.$strshow.'" href="category.php?id='.$category->id.'&page='.$page.
'&perpage='.$perpage.'&show='.$acourse->id.'&sesskey='.sesskey().'">'.
- '<img src="'.$CFG->pixpath.'/t/show.gif" class="iconsmall" alt="'.$strshow.'" /></a> ';
+ '<img src="'.$OUTPUT->old_icon_url('t/show') . '" class="iconsmall" alt="'.$strshow.'" /></a> ';
}
} else {
echo $spacer;
if (has_capability('moodle/site:backup', $coursecontext)) {
echo '<a title="'.$strbackup.'" href="../backup/backup.php?id='.$acourse->id.'">'.
- '<img src="'.$CFG->pixpath.'/t/backup.gif" class="iconsmall" alt="'.$strbackup.'" /></a> ';
+ '<img src="'.$OUTPUT->old_icon_url('t/backup') . '" class="iconsmall" alt="'.$strbackup.'" /></a> ';
} else {
echo $spacer;
}
if (has_capability('moodle/site:restore', $coursecontext)) {
echo '<a title="'.$strrestore.'" href="../files/index.php?id='.$acourse->id.
'&wdir=/backupdata">'.
- '<img src="'.$CFG->pixpath.'/t/restore.gif" class="iconsmall" alt="'.$strrestore.'" /></a> ';
+ '<img src="'.$OUTPUT->old_icon_url('t/restore') . '" class="iconsmall" alt="'.$strrestore.'" /></a> ';
} else {
echo $spacer;
}
if ($up) {
echo '<a title="'.$strmoveup.'" href="category.php?id='.$category->id.'&page='.$page.
'&perpage='.$perpage.'&moveup='.$acourse->id.'&sesskey='.sesskey().'">'.
- '<img src="'.$CFG->pixpath.'/t/up.gif" class="iconsmall" alt="'.$strmoveup.'" /></a> ';
+ '<img src="'.$OUTPUT->old_icon_url('t/up') . '" class="iconsmall" alt="'.$strmoveup.'" /></a> ';
} else {
echo $spacer;
}
if ($down) {
echo '<a title="'.$strmovedown.'" href="category.php?id='.$category->id.'&page='.$page.
'&perpage='.$perpage.'&movedown='.$acourse->id.'&sesskey='.sesskey().'">'.
- '<img src="'.$CFG->pixpath.'/t/down.gif" class="iconsmall" alt="'.$strmovedown.'" /></a> ';
+ '<img src="'.$OUTPUT->old_icon_url('t/down') . '" class="iconsmall" alt="'.$strmovedown.'" /></a> ';
} else {
echo $spacer;
}
if (!empty($acourse->guest)) {
echo '<a href="view.php?id='.$acourse->id.'"><img title="'.
$strallowguests.'" class="icon" src="'.
- $CFG->pixpath.'/i/guest.gif" alt="'.$strallowguests.'" /></a>';
+ $OUTPUT->old_icon_url('i/guest') . '" alt="'.$strallowguests.'" /></a>';
}
if (!empty($acourse->password)) {
echo '<a href="view.php?id='.$acourse->id.'"><img title="'.
$strrequireskey.'" class="icon" src="'.
- $CFG->pixpath.'/i/key.gif" alt="'.$strrequireskey.'" /></a>';
+ $OUTPUT->old_icon_url('i/key') . '" alt="'.$strrequireskey.'" /></a>';
}
if (!empty($acourse->summary)) {
link_to_popup_window ("/course/info.php?id=$acourse->id", "courseinfo",
- '<img alt="'.get_string('info').'" class="icon" src="'.$CFG->pixpath.'/i/info.gif" />',
+ '<img alt="'.get_string('info').'" class="icon" src="'.$OUTPUT->old_icon_url('i/info') . '" />',
400, 500, $strsummary);
}
echo "</td>";
if ($PAGE->user_is_editing() && has_capability('moodle/course:update', $coursecontext)) {
echo '<a title="'.$streditsummary.'" '.
- ' href="editsection.php?id='.$thissection->id.'"><img src="'.$CFG->pixpath.'/t/edit.gif" '.
+ ' href="editsection.php?id='.$thissection->id.'"><img src="'.$OUTPUT->old_icon_url('t/edit') . '" '.
' class="icon edit" alt="'.$streditsummary.'" /></a>';
}
echo '</div>';
if ($displaysection == $section) { // Show the zoom boxes
echo '<a href="view.php?id='.$course->id.'&topic=0#section-'.$section.'" title="'.$strshowalltopics.'">'.
- '<img src="'.$CFG->pixpath.'/i/all.gif" class="icon" alt="'.$strshowalltopics.'" /></a><br />';
+ '<img src="'.$OUTPUT->old_icon_url('i/all') . '" class="icon" alt="'.$strshowalltopics.'" /></a><br />';
} else {
$strshowonlytopic = get_string("showonlytopic", "", $section);
echo '<a href="view.php?id='.$course->id.'&topic='.$section.'" title="'.$strshowonlytopic.'">'.
- '<img src="'.$CFG->pixpath.'/i/one.gif" class="icon" alt="'.$strshowonlytopic.'" /></a><br />';
+ '<img src="'.$OUTPUT->old_icon_url('i/one') . '" class="icon" alt="'.$strshowonlytopic.'" /></a><br />';
}
if ($PAGE->user_is_editing() && has_capability('moodle/course:update', get_context_instance(CONTEXT_COURSE, $course->id))) {
if ($course->marker == $section) { // Show the "light globe" on/off
- echo '<a href="view.php?id='.$course->id.'&marker=0&sesskey='.sesskey().'#section-'.$section.'" title="'.$strmarkedthistopic.'">'.'<img src="'.$CFG->pixpath.'/i/marked.gif" alt="'.$strmarkedthistopic.'" /></a><br />';
+ echo '<a href="view.php?id='.$course->id.'&marker=0&sesskey='.sesskey().'#section-'.$section.'" title="'.$strmarkedthistopic.'">'.'<img src="'.$OUTPUT->old_icon_url('i/marked') . '" alt="'.$strmarkedthistopic.'" /></a><br />';
} else {
- echo '<a href="view.php?id='.$course->id.'&marker='.$section.'&sesskey='.sesskey().'#section-'.$section.'" title="'.$strmarkthistopic.'">'.'<img src="'.$CFG->pixpath.'/i/marker.gif" alt="'.$strmarkthistopic.'" /></a><br />';
+ echo '<a href="view.php?id='.$course->id.'&marker='.$section.'&sesskey='.sesskey().'#section-'.$section.'" title="'.$strmarkthistopic.'">'.'<img src="'.$OUTPUT->old_icon_url('i/marker') . '" alt="'.$strmarkthistopic.'" /></a><br />';
}
if ($thissection->visible) { // Show the hide/show eye
echo '<a href="view.php?id='.$course->id.'&hide='.$section.'&sesskey='.sesskey().'#section-'.$section.'" title="'.$strtopichide.'">'.
- '<img src="'.$CFG->pixpath.'/i/hide.gif" class="icon hide" alt="'.$strtopichide.'" /></a><br />';
+ '<img src="'.$OUTPUT->old_icon_url('i/hide') . '" class="icon hide" alt="'.$strtopichide.'" /></a><br />';
} else {
echo '<a href="view.php?id='.$course->id.'&show='.$section.'&sesskey='.sesskey().'#section-'.$section.'" title="'.$strtopicshow.'">'.
- '<img src="'.$CFG->pixpath.'/i/show.gif" class="icon hide" alt="'.$strtopicshow.'" /></a><br />';
+ '<img src="'.$OUTPUT->old_icon_url('i/show') . '" class="icon hide" alt="'.$strtopicshow.'" /></a><br />';
}
if ($section > 1) { // Add a arrow to move section up
echo '<a href="view.php?id='.$course->id.'&random='.rand(1,10000).'&section='.$section.'&move=-1&sesskey='.sesskey().'#section-'.($section-1).'" title="'.$strmoveup.'">'.
- '<img src="'.$CFG->pixpath.'/t/up.gif" class="icon up" alt="'.$strmoveup.'" /></a><br />';
+ '<img src="'.$OUTPUT->old_icon_url('t/up') . '" class="icon up" alt="'.$strmoveup.'" /></a><br />';
}
if ($section < $course->numsections) { // Add a arrow to move section down
echo '<a href="view.php?id='.$course->id.'&random='.rand(1,10000).'&section='.$section.'&move=1&sesskey='.sesskey().'#section-'.($section+1).'" title="'.$strmovedown.'">'.
- '<img src="'.$CFG->pixpath.'/t/down.gif" class="icon down" alt="'.$strmovedown.'" /></a><br />';
+ '<img src="'.$OUTPUT->old_icon_url('t/down') . '" class="icon down" alt="'.$strmovedown.'" /></a><br />';
}
}
echo '</div>';
if ($PAGE->user_is_editing() && has_capability('moodle/course:update', get_context_instance(CONTEXT_COURSE, $course->id))) {
echo ' <a title="'.$streditsummary.'" href="editsection.php?id='.$thissection->id.'">'.
- '<img src="'.$CFG->pixpath.'/t/edit.gif" class="icon edit" alt="'.$streditsummary.'" /></a><br /><br />';
+ '<img src="'.$OUTPUT->old_icon_url('t/edit') . '" class="icon edit" alt="'.$streditsummary.'" /></a><br /><br />';
}
echo '</div>';
if ($PAGE->user_is_editing() && has_capability('moodle/course:update', get_context_instance(CONTEXT_COURSE, $course->id))) {
echo '<p><a title="'.$streditsummary.'" '.
- ' href="editsection.php?id='.$thissection->id.'"><img src="'.$CFG->pixpath.'/t/edit.gif" '.
+ ' href="editsection.php?id='.$thissection->id.'"><img src="'.$OUTPUT->old_icon_url('t/edit') . '" '.
' class="icon edit" alt="'.$streditsummary.'" /></a></p>';
}
echo '</div>';
if ($displaysection == $section) {
echo '<a href="view.php?id='.$course->id.'&week=0#section-'.$section.'" title="'.$strshowallweeks.'">'.
- '<img src="'.$CFG->pixpath.'/i/all.gif" class="icon wkall" alt="'.$strshowallweeks.'" /></a><br />';
+ '<img src="'.$OUTPUT->old_icon_url('i/all') . '" class="icon wkall" alt="'.$strshowallweeks.'" /></a><br />';
} else {
$strshowonlyweek = get_string("showonlyweek", "", $section);
echo '<a href="view.php?id='.$course->id.'&week='.$section.'" title="'.$strshowonlyweek.'">'.
- '<img src="'.$CFG->pixpath.'/i/one.gif" class="icon wkone" alt="'.$strshowonlyweek.'" /></a><br />';
+ '<img src="'.$OUTPUT->old_icon_url('i/one') . '" class="icon wkone" alt="'.$strshowonlyweek.'" /></a><br />';
}
if ($PAGE->user_is_editing() && has_capability('moodle/course:update', get_context_instance(CONTEXT_COURSE, $course->id))) {
if ($thissection->visible) { // Show the hide/show eye
echo '<a href="view.php?id='.$course->id.'&hide='.$section.'&sesskey='.sesskey().'#section-'.$section.'" title="'.$strweekhide.'">'.
- '<img src="'.$CFG->pixpath.'/i/hide.gif" class="icon hide" alt="'.$strweekhide.'" /></a><br />';
+ '<img src="'.$OUTPUT->old_icon_url('i/hide') . '" class="icon hide" alt="'.$strweekhide.'" /></a><br />';
} else {
echo '<a href="view.php?id='.$course->id.'&show='.$section.'&sesskey='.sesskey().'#section-'.$section.'" title="'.$strweekshow.'">'.
- '<img src="'.$CFG->pixpath.'/i/show.gif" class="icon hide" alt="'.$strweekshow.'" /></a><br />';
+ '<img src="'.$OUTPUT->old_icon_url('i/show') . '" class="icon hide" alt="'.$strweekshow.'" /></a><br />';
}
if ($section > 1) { // Add a arrow to move section up
echo '<a href="view.php?id='.$course->id.'&random='.rand(1,10000).'&section='.$section.'&move=-1&sesskey='.sesskey().'#section-'.($section-1).'" title="'.$strmoveup.'">'.
- '<img src="'.$CFG->pixpath.'/t/up.gif" class="icon up" alt="'.$strmoveup.'" /></a><br />';
+ '<img src="'.$OUTPUT->old_icon_url('t/up') . '" class="icon up" alt="'.$strmoveup.'" /></a><br />';
}
if ($section < $course->numsections) { // Add a arrow to move section down
echo '<a href="view.php?id='.$course->id.'&random='.rand(1,10000).'&section='.$section.'&move=1&sesskey='.sesskey().'#section-'.($section+1).'" title="'.$strmovedown.'">'.
- '<img src="'.$CFG->pixpath.'/t/down.gif" class="icon down" alt="'.$strmovedown.'" /></a><br />';
+ '<img src="'.$OUTPUT->old_icon_url('t/down') . '" class="icon down" alt="'.$strmovedown.'" /></a><br />';
}
}
echo '</div>';
if ($PAGE->user_is_editing() && has_capability('moodle/course:update', get_context_instance(CONTEXT_COURSE, $course->id))) {
echo ' <a title="'.$streditsummary.'" href="editsection.php?id='.$thissection->id.'">'.
- '<img src="'.$CFG->pixpath.'/t/edit.gif" class="icon edit" alt="'.$streditsummary.'" /></a><br /><br />';
+ '<img src="'.$OUTPUT->old_icon_url('t/edit') . '" class="icon edit" alt="'.$streditsummary.'" /></a><br /><br />';
}
echo '</div>';
function print_category_edit($category, $displaylist, $parentslist, $depth=-1, $up=false, $down=false) {
/// Recursive function to print all the categories ready for editing
- global $CFG, $USER;
+ global $CFG, $USER, $OUTPUT;
static $str = NULL;
if (has_capability('moodle/category:manage', $category->context)) {
echo '<a title="'.$str->edit.'" href="editcategory.php?id='.$category->id.'"><img'.
- ' src="'.$CFG->pixpath.'/t/edit.gif" class="iconsmall" alt="'.$str->edit.'" /></a> ';
+ ' src="'.$OUTPUT->old_icon_url('t/edit') . '" class="iconsmall" alt="'.$str->edit.'" /></a> ';
echo '<a title="'.$str->delete.'" href="index.php?delete='.$category->id.'&sesskey='.sesskey().'"><img'.
- ' src="'.$CFG->pixpath.'/t/delete.gif" class="iconsmall" alt="'.$str->delete.'" /></a> ';
+ ' src="'.$OUTPUT->old_icon_url('t/delete') . '" class="iconsmall" alt="'.$str->delete.'" /></a> ';
if (!empty($category->visible)) {
echo '<a title="'.$str->hide.'" href="index.php?hide='.$category->id.'&sesskey='.sesskey().'"><img'.
- ' src="'.$CFG->pixpath.'/t/hide.gif" class="iconsmall" alt="'.$str->hide.'" /></a> ';
+ ' src="'.$OUTPUT->old_icon_url('t/hide') . '" class="iconsmall" alt="'.$str->hide.'" /></a> ';
} else {
echo '<a title="'.$str->show.'" href="index.php?show='.$category->id.'&sesskey='.sesskey().'"><img'.
- ' src="'.$CFG->pixpath.'/t/show.gif" class="iconsmall" alt="'.$str->show.'" /></a> ';
+ ' src="'.$OUTPUT->old_icon_url('t/show') . '" class="iconsmall" alt="'.$str->show.'" /></a> ';
}
if ($up) {
echo '<a title="'.$str->moveup.'" href="index.php?moveup='.$category->id.'&sesskey='.sesskey().'"><img'.
- ' src="'.$CFG->pixpath.'/t/up.gif" class="iconsmall" alt="'.$str->moveup.'" /></a> ';
+ ' src="'.$OUTPUT->old_icon_url('t/up') . '" class="iconsmall" alt="'.$str->moveup.'" /></a> ';
} else {
echo $str->spacer;
}
if ($down) {
echo '<a title="'.$str->movedown.'" href="index.php?movedown='.$category->id.'&sesskey='.sesskey().'"><img'.
- ' src="'.$CFG->pixpath.'/t/down.gif" class="iconsmall" alt="'.$str->movedown.'" /></a> ';
+ ' src="'.$OUTPUT->old_icon_url('t/down') . '" class="iconsmall" alt="'.$str->movedown.'" /></a> ';
} else {
echo $str->spacer;
}
* This function is only used by print_whole_category_list() above
*/
function print_category_info($category, $depth, $showcourses = false) {
- global $CFG, $DB;
+ global $CFG, $DB, $OUTPUT;
static $strallowguests, $strrequireskey, $strsummary;
if (empty($strsummary)) {
}
if ($showcourses and $coursecount) {
- $catimage = '<img src="'.$CFG->pixpath.'/i/course.gif" alt="" />';
+ $catimage = '<img src="'.$OUTPUT->old_icon_url('i/course') . '" alt="" />';
} else {
$catimage = " ";
}
echo '</td><td align="right" valign="top" class="course info">';
if ($course->guest ) {
echo '<a title="'.$strallowguests.'" href="'.$CFG->wwwroot.'/course/view.php?id='.$course->id.'">';
- echo '<img alt="'.$strallowguests.'" src="'.$CFG->pixpath.'/i/guest.gif" /></a>';
+ echo '<img alt="'.$strallowguests.'" src="'.$OUTPUT->old_icon_url('i/guest') . '" /></a>';
} else {
echo '<img alt="" style="width:18px;height:16px;" src="'.$CFG->pixpath.'/spacer.gif" />';
}
if ($course->password) {
echo '<a title="'.$strrequireskey.'" href="'.$CFG->wwwroot.'/course/view.php?id='.$course->id.'">';
- echo '<img alt="'.$strrequireskey.'" src="'.$CFG->pixpath.'/i/key.gif" /></a>';
+ echo '<img alt="'.$strrequireskey.'" src="'.$OUTPUT->old_icon_url('i/key') . '" /></a>';
} else {
echo '<img alt="" style="width:18px;height:16px;" src="'.$CFG->pixpath.'/spacer.gif" />';
}
if ($course->summary) {
link_to_popup_window ('/course/info.php?id='.$course->id, 'courseinfo',
- '<img alt="'.$strsummary.'" src="'.$CFG->pixpath.'/i/info.gif" />',
+ '<img alt="'.$strsummary.'" src="'.$OUTPUT->old_icon_url('i/info') . '" />',
400, 500, $strsummary);
} else {
echo '<img alt="" style="width:18px;height:16px;" src="'.$CFG->pixpath.'/spacer.gif" />';
}
function print_remote_host($host, $width="100%") {
- global $CFG, $USER;
+ global $OUTPUT;
$linkcss = '';
echo '<div class="coursebox clearfix">';
echo '<div class="info">';
echo '<div class="name">';
- echo '<img src="'.$CFG->pixpath.'/i/mnethost.gif" class="icon" alt="'.get_string('course').'" />';
+ echo '<img src="'.$OUTPUT->old_icon_url('i/mnethost') . '" class="icon" alt="'.get_string('course').'" />';
echo '<a title="'.s($host['name']).'" href="'.s($host['url']).'">'
. s($host['name']).'</a> - ';
echo $host['count'] . ' ' . get_string('courses');
}
function make_editing_buttons($mod, $absolute=false, $moveselect=true, $indent=-1, $section=-1) {
- global $CFG, $USER, $DB;
+ global $CFG, $USER, $DB, $OUTPUT;
static $str;
static $sesskey;
if ($mod->visible) {
$hideshow = '<a class="editing_hide" title="'.$str->hide.'" href="'.$path.'/mod.php?hide='.$mod->id.
'&sesskey='.$sesskey.$section.'"><img'.
- ' src="'.$CFG->pixpath.'/t/hide.gif" class="iconsmall" '.
+ ' src="'.$OUTPUT->old_icon_url('t/hide') . '" class="iconsmall" '.
' alt="'.$str->hide.'" /></a>'."\n";
} else {
$hideshow = '<a class="editing_show" title="'.$str->show.'" href="'.$path.'/mod.php?show='.$mod->id.
'&sesskey='.$sesskey.$section.'"><img'.
- ' src="'.$CFG->pixpath.'/t/show.gif" class="iconsmall" '.
+ ' src="'.$OUTPUT->old_icon_url('t/show') . '" class="iconsmall" '.
' alt="'.$str->show.'" /></a>'."\n";
}
} else {
if ($mod->groupmode == SEPARATEGROUPS) {
$grouptitle = $str->groupsseparate;
$groupclass = 'editing_groupsseparate';
- $groupimage = $CFG->pixpath.'/t/groups.gif';
+ $groupimage = $OUTPUT->old_icon_url('t/groups') . '';
$grouplink = $path.'/mod.php?id='.$mod->id.'&groupmode=0&sesskey='.$sesskey;
} else if ($mod->groupmode == VISIBLEGROUPS) {
$grouptitle = $str->groupsvisible;
$groupclass = 'editing_groupsvisible';
- $groupimage = $CFG->pixpath.'/t/groupv.gif';
+ $groupimage = $OUTPUT->old_icon_url('t/groupv') . '';
$grouplink = $path.'/mod.php?id='.$mod->id.'&groupmode=1&sesskey='.$sesskey;
} else {
$grouptitle = $str->groupsnone;
$groupclass = 'editing_groupsnone';
- $groupimage = $CFG->pixpath.'/t/groupn.gif';
+ $groupimage = $OUTPUT->old_icon_url('t/groupn') . '';
$grouplink = $path.'/mod.php?id='.$mod->id.'&groupmode=2&sesskey='.$sesskey;
}
if ($mod->groupmodelink) {
if ($moveselect) {
$move = '<a class="editing_move" title="'.$str->move.'" href="'.$path.'/mod.php?copy='.$mod->id.
'&sesskey='.$sesskey.$section.'"><img'.
- ' src="'.$CFG->pixpath.'/t/move.gif" class="iconsmall" '.
+ ' src="'.$OUTPUT->old_icon_url('t/move') . '" class="iconsmall" '.
' alt="'.$str->move.'" /></a>'."\n";
} else {
$move = '<a class="editing_moveup" title="'.$str->moveup.'" href="'.$path.'/mod.php?id='.$mod->id.
'&move=-1&sesskey='.$sesskey.$section.'"><img'.
- ' src="'.$CFG->pixpath.'/t/up.gif" class="iconsmall" '.
+ ' src="'.$OUTPUT->old_icon_url('t/up') . '" class="iconsmall" '.
' alt="'.$str->moveup.'" /></a>'."\n".
'<a class="editing_movedown" title="'.$str->movedown.'" href="'.$path.'/mod.php?id='.$mod->id.
'&move=1&sesskey='.$sesskey.$section.'"><img'.
- ' src="'.$CFG->pixpath.'/t/down.gif" class="iconsmall" '.
+ ' src="'.$OUTPUT->old_icon_url('t/down') . '" class="iconsmall" '.
' alt="'.$str->movedown.'" /></a>'."\n";
}
} else {
if (has_capability('moodle/course:managegroups', $modcontext)){
$context = get_context_instance(CONTEXT_MODULE, $mod->id);
$assign = '<a class="editing_assign" title="'.$str->assign.'" href="'.$CFG->wwwroot.'/'.$CFG->admin.'/roles/assign.php?contextid='.
- $context->id.'"><img src="'.$CFG->pixpath.'/i/roles.gif" alt="'.$str->assign.'" class="iconsmall"/></a>';
+ $context->id.'"><img src="'.$OUTPUT->old_icon_url('i/roles') . '" alt="'.$str->assign.'" class="iconsmall"/></a>';
} else {
$assign = '';
}
return '<span class="commands">'."\n".$leftright.$move.
'<a class="editing_update" title="'.$str->update.'" href="'.$path.'/mod.php?update='.$mod->id.
'&sesskey='.$sesskey.$section.'"><img'.
- ' src="'.$CFG->pixpath.'/t/edit.gif" class="iconsmall" '.
+ ' src="'.$OUTPUT->old_icon_url('t/edit') . '" class="iconsmall" '.
' alt="'.$str->update.'" /></a>'."\n".
'<a class="editing_delete" title="'.$str->delete.'" href="'.$path.'/mod.php?delete='.$mod->id.
'&sesskey='.$sesskey.$section.'"><img'.
- ' src="'.$CFG->pixpath.'/t/delete.gif" class="iconsmall" '.
+ ' src="'.$OUTPUT->old_icon_url('t/delete') . '" class="iconsmall" '.
' alt="'.$str->delete.'" /></a>'."\n".$hideshow.$groupmode."\n".$assign.'</span>';
}
/// Show an enrolment key icon in the first column if applicable.
if (!empty($course->password)) {
- $row[] = '<img hspace="1" alt="'.$strrequireskey.'" class="icon" src="'.$CFG->pixpath.'/i/key.gif" />';
+ $row[] = '<img hspace="1" alt="'.$strrequireskey.'" class="icon" src="'.$OUTPUT->old_icon_url('i/key') . '" />';
} else {
$row[] = '';
}
// checks whether user can do role assignment
if (has_capability('moodle/role:assign', $coursecontext)) {
echo'<a title="'.get_string('assignroles', 'role').'" href="'.$CFG->wwwroot.'/'.$CFG->admin.'/roles/assign.php?contextid='.$coursecontext->id.'">';
- echo '<img src="'.$CFG->pixpath.'/i/roles.gif" class="iconsmall" alt="'.get_string('assignroles', 'role').'" /></a> ' . "\n";
+ echo '<img src="'.$OUTPUT->old_icon_url('i/roles') . '" class="iconsmall" alt="'.get_string('assignroles', 'role').'" /></a> ' . "\n";
}
// checks whether user can delete course
* @param course the current course, as an object
*/
function get_access_icons($course) {
- global $CFG;
+ global $CFG, $OUTPUT;
global $strallowguests;
global $strrequireskey;
if (!empty($course->guest)) {
$str .= '<a title="'.$strallowguests.'" href="'.$CFG->wwwroot.'/course/view.php?id='.$course->id.'">';
- $str .= '<img class="accessicon" alt="'.$strallowguests.'" src="'.$CFG->pixpath.'/i/guest.gif" /></a> ';
+ $str .= '<img class="accessicon" alt="'.$strallowguests.'" src="'.$OUTPUT->old_icon_url('i/guest') . '" /></a> ';
}
if (!empty($course->password)) {
$str .= '<a title="'.$strrequireskey.'" href="'.$CFG->wwwroot.'/course/view.php?id='.$course->id.'">';
- $str .= '<img class="accessicon" alt="'.$strrequireskey.'" src="'.$CFG->pixpath.'/i/key.gif" /></a>';
+ $str .= '<img class="accessicon" alt="'.$strrequireskey.'" src="'.$OUTPUT->old_icon_url('i/key') . '" /></a>';
}
return $str;
if ($parent) {
echo '<div class="folder">';
- echo '<a href="draftfiles.php?itemid='.$itemid.'&filepath='.$parent->get_filepath().'&subdirs='.$subdirs.'&maxbytes='.$maxbytes.'"><img src="'.$CFG->pixpath.'/f/parent.gif" class="icon" alt="" /> '.get_string('parentfolder').'</a>';
+ echo '<a href="draftfiles.php?itemid='.$itemid.'&filepath='.$parent->get_filepath().'&subdirs='.$subdirs.'&maxbytes='.$maxbytes.'"><img src="'.$OUTPUT->old_icon_url('f/parent') . '" class="icon" alt="" /> '.get_string('parentfolder').'</a>';
echo '</div>';
}
echo "<tr class=\"folder\">";
print_cell();
- print_cell('left', '<a href="index.php?'.$params.'"><img src="'.$CFG->pixpath.'/f/parent.gif" class="icon" alt="" /> '.get_string('parentfolder').'</a>', 'name');
+ print_cell('left', '<a href="index.php?'.$params.'"><img src="'.$OUTPUT->old_icon_url('f/parent') . '" class="icon" alt="" /> '.get_string('parentfolder').'</a>', 'name');
print_cell();
print_cell();
print_cell();
* @return string HTML
*/
public function build_html_tree($element, $totals, $parents, &$categories, $level, &$row_count) {
- global $CFG, $COURSE, $USER;
+ global $CFG, $COURSE, $USER, $OUTPUT;
$object = $element['object'];
$eid = $element['eid'];
if ($element['type'] == 'item' or ($element['type'] == 'category' and $element['depth'] > 1)) {
if ($this->element_deletable($element)) {
$actions .= '<a href="index.php?id='.$COURSE->id.'&action=delete&eid='
- . $eid.'&sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/delete.gif" class="iconsmall" alt="'
+ . $eid.'&sesskey='.sesskey().'"><img src="'.$OUTPUT->old_icon_url('t/delete') . '" class="iconsmall" alt="'
. get_string('delete').'" title="'.get_string('delete').'"/></a>';
}
$actions .= '<a href="index.php?id='.$COURSE->id.'&action=moveselect&eid='
- . $eid.'&sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/move.gif" class="iconsmall" alt="'
+ . $eid.'&sesskey='.sesskey().'"><img src="'.$OUTPUT->old_icon_url('t/move') . '" class="iconsmall" alt="'
. get_string('move').'" title="'.get_string('move').'"/></a>';
}
* @return string icon or spacer
*/
public function get_element_icon(&$element, $spacerifnone=false) {
- global $CFG;
+ global $CFG, $OUTPUT;
switch ($element['type']) {
case 'item':
if ($element['object']->is_calculated()) {
$strcalc = get_string('calculatedgrade', 'grades');
- return '<img src="'.$CFG->pixpath.'/i/calc.gif" class="icon itemicon" title="'.
+ return '<img src="'.$OUTPUT->old_icon_url('i/calc') . '" class="icon itemicon" title="'.
s($strcalc).'" alt="'.s($strcalc).'"/>';
} else if (($is_course or $is_category) and ($is_scale or $is_value)) {
case GRADE_AGGREGATE_WEIGHTED_MEAN2:
case GRADE_AGGREGATE_EXTRACREDIT_MEAN:
$stragg = get_string('aggregation', 'grades');
- return '<img src="'.$CFG->pixpath.'/i/agg_mean.gif" ' .
+ return '<img src="'.$OUTPUT->old_icon_url('i/agg_mean') . '" ' .
'class="icon itemicon" title="'.s($stragg).'" alt="'.s($stragg).'"/>';
case GRADE_AGGREGATE_SUM:
$stragg = get_string('aggregation', 'grades');
- return '<img src="'.$CFG->pixpath.'/i/agg_sum.gif" ' .
+ return '<img src="'.$OUTPUT->old_icon_url('i/agg_sum') . '" ' .
'class="icon itemicon" title="'.s($stragg).'" alt="'.s($stragg).'"/>';
}
}
} else if ($element['object']->itemtype == 'manual') {
if ($element['object']->is_outcome_item()) {
$stroutcome = get_string('outcome', 'grades');
- return '<img src="'.$CFG->pixpath.'/i/outcomes.gif" ' .
+ return '<img src="'.$OUTPUT->old_icon_url('i/outcomes') . '" ' .
'class="icon itemicon" title="'.s($stroutcome).
'" alt="'.s($stroutcome).'"/>';
} else {
$strmanual = get_string('manualitem', 'grades');
- return '<img src="'.$CFG->pixpath.'/t/manual_item.gif" '.
+ return '<img src="'.$OUTPUT->old_icon_url('t/manual_item') . '" '.
'class="icon itemicon" title="'.s($strmanual).
'" alt="'.s($strmanual).'"/>';
}
case 'category':
$strcat = get_string('category', 'grades');
- return '<img src="'.$CFG->pixpath.'/f/folder.gif" class="icon itemicon" ' .
+ return '<img src="'.$OUTPUT->old_icon_url('f/folder') . '" class="icon itemicon" ' .
'title="'.s($strcat).'" alt="'.s($strcat).'" />';
}
* @return string
*/
public function get_edit_icon($element, $gpr) {
- global $CFG;
+ global $CFG, $OUTPUT;
if (!has_capability('moodle/grade:manage', $this->context)) {
if ($element['type'] == 'grade' and has_capability('moodle/grade:edit', $this->context)) {
}
if ($url) {
- return '<a href="'.$url.'"><img src="'.$CFG->pixpath.'/t/edit.gif" ' .
+ return '<a href="'.$url.'"><img src="'.$OUTPUT->old_icon_url('t/edit') . '" ' .
'class="iconsmall" alt="'.s($stredit).'" title="'.s($stredit).'"/></a>';
} else {
. '&eid='.$element['eid'];
$url = $gpr->add_url_params($url);
$action = '<a href="'.$url.'" class="hide"><img src="'.
- $CFG->pixpath.'/t/hide.gif" class="iconsmall" alt="'.s($strhide).'" title="'.s($strhide).'"/></a>';
+ $OUTPUT->old_icon_url('t/hide') . '" class="iconsmall" alt="'.s($strhide).'" title="'.s($strhide).'"/></a>';
}
return $action;
}
* @return string
*/
public function get_locking_icon($element, $gpr) {
- global $CFG;
+ global $CFG, $OUTPUT;
$strparams = $this->get_params_for_iconstr($element);
$strunlock = get_string('unlockverbose', 'grades', $strparams);
$strparamobj = new stdClass();
$strparamobj->itemname = $element['object']->grade_item->itemname;
$strnonunlockable = get_string('nonunlockableverbose', 'grades', $strparamobj);
- $action = '<img src="'.$CFG->pixpath.'/t/unlock_gray.gif" alt="'.
+ $action = '<img src="'.$OUTPUT->old_icon_url('t/unlock_gray') . '" alt="'.
s($strnonunlockable).'" class="iconsmall" title="'.
s($strnonunlockable).'"/>';
} else if ($element['object']->is_locked()) {
$url = $gpr->add_url_params($url);
$action = '<a href="'.$url.'" class="lock"><img src="'.
- $CFG->pixpath.'/t/lock.gif" class="iconsmall" alt="'.
+ $OUTPUT->old_icon_url('t/lock') . '" class="iconsmall" alt="'.
s($strlock).'" title="' . s($strlock).'"/></a>';
}
return $action;