Commit b5d0cafc authored by Petr Skoda's avatar Petr Skoda
Browse files

MDL-20787 final switch to new $OUTPUT->pix_url() - yay!

parent cb1e046d
......@@ -168,10 +168,10 @@
if ($blocks[$blockid]->visible) {
$visible = '<a href="blocks.php?hide='.$blockid.'&amp;sesskey='.sesskey().'" title="'.$strhide.'">'.
'<img src="'.$OUTPUT->old_icon_url('i/hide') . '" class="icon" alt="'.$strhide.'" /></a>';
'<img src="'.$OUTPUT->pix_url('i/hide') . '" class="icon" alt="'.$strhide.'" /></a>';
} else {
$visible = '<a href="blocks.php?show='.$blockid.'&amp;sesskey='.sesskey().'" title="'.$strshow.'">'.
'<img src="'.$OUTPUT->old_icon_url('i/show') . '" class="icon" alt="'.$strshow.'" /></a>';
'<img src="'.$OUTPUT->pix_url('i/show') . '" class="icon" alt="'.$strshow.'" /></a>';
$class = ' class="dimmed_text"'; // Leading space required!
}
......
......@@ -233,7 +233,7 @@ function action_url($filterpath, $action) {
function action_icon($url, $icon, $straction) {
global $CFG, $OUTPUT;
return '<a href="' . $url . '" title="' . $straction . '">' .
'<img src="' . $OUTPUT->old_icon_url('t/' . $icon) . '" alt="' . $straction . '" /></a> ';
'<img src="' . $OUTPUT->pix_url('t/' . $icon) . '" alt="' . $straction . '" /></a> ';
}
function get_table_row($filterinfo, $isfirstrow, $islastactive, $applytostrings) {
......@@ -256,7 +256,7 @@ function get_table_row($filterinfo, $isfirstrow, $islastactive, $applytostrings)
// Re-order
$updown = '';
$spacer = '<img src="' . $OUTPUT->old_icon_url('spacer') . '" class="iconsmall" alt="" /> ';
$spacer = '<img src="' . $OUTPUT->pix_url('spacer') . '" class="iconsmall" alt="" /> ';
if ($filterinfo->active != TEXTFILTER_DISABLED) {
if (!$isfirstrow) {
$updown .= action_icon(action_url($filter, 'up'), 'up', get_string('up'));
......
......@@ -611,9 +611,9 @@
if (LANG_DISPLAY_MISSING_LINKS) {
$missingtarget = '<a name="missing'.$missingcounter.'"></a>';
$missingnext = '<a href="#missing'.($missingcounter+1).'">'.
'<img src="' . $OUTPUT->old_icon_url('t/down') . '" class="iconsmall" alt="'.$strnext.'" /></a>';
'<img src="' . $OUTPUT->pix_url('t/down') . '" class="iconsmall" alt="'.$strnext.'" /></a>';
$missingprev = '<a href="#missing'.($missingcounter-1).'">'.
'<img src="' . $OUTPUT->old_icon_url('t/up') . '" class="iconsmall" alt="'.$strprev.'" /></a>';
'<img src="' . $OUTPUT->pix_url('t/up') . '" class="iconsmall" alt="'.$strprev.'" /></a>';
}
} else {
// the string is translated in the pack being processed
......@@ -624,9 +624,9 @@
if (LANG_DISPLAY_MISSING_LINKS) {
$missingtarget = '<a name="missing'.$missingcounter.'"></a>';
$missingnext = '<a href="#missing'.($missingcounter+1).'">'.
'<img src="' . $OUTPUT->old_icon_url('t/down') . '" class="iconsmall" alt="'.$strnext.'" /></a>';
'<img src="' . $OUTPUT->pix_url('t/down') . '" class="iconsmall" alt="'.$strnext.'" /></a>';
$missingprev = '<a href="#missing'.($missingcounter-1).'">'.
'<img src="' . $OUTPUT->old_icon_url('t/up') . '" class="iconsmall" alt="'.$strprev.'" /></a>';
'<img src="' . $OUTPUT->pix_url('t/up') . '" class="iconsmall" alt="'.$strprev.'" /></a>';
}
}
}
......
......@@ -151,7 +151,7 @@ foreach ($columns as $column) {
} else {
$columndir = $dir == "ASC" ? "DESC" : "ASC";
$columnicon = $dir == "ASC" ? "down" : "up";
$columnicon = " <img src=\"" . $OUTPUT->old_icon_url('t/' . $columnicon) . "\" alt=\"\" />";
$columnicon = " <img src=\"" . $OUTPUT->pix_url('t/' . $columnicon) . "\" alt=\"\" />";
}
$headings[$column] = "<a href=\"?sort=$column&amp;dir=$columndir&amp;\">".$string[$column]."</a>$columnicon";
}
......
......@@ -32,7 +32,7 @@
echo '<div id="trustedhosts"><!-- See theme/standard/styles_layout.css #trustedhosts .generaltable for rules -->'
. '<table class="generaltable">';
$icon = "<img src=\"" . $OUTPUT->old_icon_url('i/course') . "\"".
$icon = "<img src=\"" . $OUTPUT->pix_url('i/course') . "\"".
" class=\"icon\" alt=\"".get_string("course")."\" />";
foreach ($courses as $course) {
......
......@@ -129,7 +129,7 @@
foreach ($modulebyname as $modulename => $module) {
// took out hspace="\10\", because it does not validate. don't know what to replace with.
$icon = "<img src=\"" . $OUTPUT->old_icon_url('icon', $module->name) . "\" class=\"icon\" alt=\"\" />";
$icon = "<img src=\"" . $OUTPUT->pix_url('icon', $module->name) . "\" class=\"icon\" alt=\"\" />";
$delete = "<a href=\"modules.php?delete=$module->name&amp;sesskey=".sesskey()."\">$strdelete</a>";
......@@ -151,11 +151,11 @@
if ($module->visible) {
$visible = "<a href=\"modules.php?hide=$module->name&amp;sesskey=".sesskey()."\" title=\"$strhide\">".
"<img src=\"" . $OUTPUT->old_icon_url('i/hide') . "\" class=\"icon\" alt=\"$strhide\" /></a>";
"<img src=\"" . $OUTPUT->pix_url('i/hide') . "\" class=\"icon\" alt=\"$strhide\" /></a>";
$class = "";
} else {
$visible = "<a href=\"modules.php?show=$module->name&amp;sesskey=".sesskey()."\" title=\"$strshow\">".
"<img src=\"" . $OUTPUT->old_icon_url('i/show') . "\" class=\"icon\" alt=\"$strshow\" /></a>";
"<img src=\"" . $OUTPUT->pix_url('i/show') . "\" class=\"icon\" alt=\"$strshow\" /></a>";
$class = " class=\"dimmed_text\"";
}
if ($module->name == "forum") {
......
......@@ -229,7 +229,7 @@
$rowclass = 'dimmed_text';
}
} else {
$icons = '<img src="' . $OUTPUT->old_icon_url('spacer') . '" alt="" class="spacer" />';
$icons = '<img src="' . $OUTPUT->pix_url('spacer') . '" alt="" class="spacer" />';
}
// Move icons.
......@@ -282,7 +282,7 @@ function icon_html($action, $qtypename, $icon, $alt, $tip) {
$html = ' <form action="' . admin_url('qtypes.php') . '" method="post"><div>';
$html .= '<input type="hidden" name="sesskey" value="' . sesskey() . '" />';
$html .= '<input type="image" name="' . $action . '" value="' . $qtypename .
'" src="' . $OUTPUT->old_icon_url($icon) . '" alt="' . $alt . '" ' . $tip . '/>';
'" src="' . $OUTPUT->pix_url($icon) . '" alt="' . $alt . '" ' . $tip . '/>';
$html .= '</div></form>';
return $html;
}
......
......@@ -46,7 +46,7 @@ foreach ($columns as $column=>$strcolumn) {
} else {
$columnicon = $dir == 'ASC' ? 'down':'up';
}
$columnicon = " <img src=\"" . $OUTPUT->old_icon_url('t/' . $columnicon) . "\" alt=\"\" />";
$columnicon = " <img src=\"" . $OUTPUT->pix_url('t/' . $columnicon) . "\" alt=\"\" />";
}
$hcolumns[$column] = "<a href=\"index.php?sort=$column&amp;dir=$columndir&amp;page=$page&amp;perpage=$perpage\">".$strcolumn."</a>$columnicon";
......
......@@ -421,7 +421,7 @@ abstract class capability_table_with_risks extends capability_table_base {
function get_risk_icon($type) {
global $OUTPUT;
if (!isset($this->riskicons[$type])) {
$iconurl = $OUTPUT->old_icon_url('i/' . str_replace('risk', 'risk_', $type));
$iconurl = $OUTPUT->pix_url('i/' . str_replace('risk', 'risk_', $type));
$link = html_link::make($this->risksurl, '<img src="' . $iconurl . '" alt="' . get_string($type . 'short', 'admin') . '" />');
$link->add_action(new popup_action('click', $link->url, 'docspopup'));
......
......@@ -274,9 +274,9 @@
function get_action_icon($url, $icon, $alt, $tooltip) {
global $OUTPUT;
return '<a title="' . $tooltip . '" href="'. $url . '">' .
'<img src="' . $OUTPUT->old_icon_url('t/' . $icon) . '" class="iconsmall" alt="' . $alt . '" /></a> ';
'<img src="' . $OUTPUT->pix_url('t/' . $icon) . '" class="iconsmall" alt="' . $alt . '" /></a> ';
}
function get_spacer() {
global $OUTPUT;
return '<img src="' . $OUTPUT->old_icon_url('spacer') . '" class="iconsmall" alt="" /> ';
return '<img src="' . $OUTPUT->pix_url('spacer') . '" class="iconsmall" alt="" /> ';
}
......@@ -201,9 +201,9 @@ function print_report_tree($contextid, $contexts, $systemcontext, $fullname) {
$strcheck = get_string('checkuserspermissionshere', 'role', $a);
}
echo ' <a title="' . $strgoto . '" href="' . $raurl . '"><img class="iconsmall" src="' .
$OUTPUT->old_icon_url('t/edit') . '" alt="' . $stredit . '" /></a> ';
$OUTPUT->pix_url('t/edit') . '" alt="' . $stredit . '" /></a> ';
echo ' <a title="' . $strcheck . '" href="' . $churl . '"><img class="iconsmall" src="' .
$OUTPUT->old_icon_url('t/preview') . '" alt="' . $strcheckpermissions . '" /></a> ';
$OUTPUT->pix_url('t/preview') . '" alt="' . $strcheckpermissions . '" /></a> ';
echo "</p>\n";
}
}
......
......@@ -140,7 +140,7 @@
} else {
$columnicon = $dir == "ASC" ? "down":"up";
}
$columnicon = " <img src=\"" . $OUTPUT->old_icon_url('t/' . $columnicon) . "\" alt=\"\" />";
$columnicon = " <img src=\"" . $OUTPUT->pix_url('t/' . $columnicon) . "\" alt=\"\" />";
}
$$column = "<a href=\"user.php?sort=$column&amp;dir=$columndir\">".$string[$column]."</a>$columnicon";
......
......@@ -56,7 +56,7 @@ foreach ($columns as $column) {
$columndir = 'asc';
} else {
$columndir = $dir == 'asc' ? 'desc' : 'asc';
$columnicon = ' <img src="'.$OUTPUT->old_icon_url('t/'.($dir == 'asc' ? 'down' : 'up' )).'f" alt="" />';
$columnicon = ' <img src="'.$OUTPUT->pix_url('t/'.($dir == 'asc' ? 'down' : 'up' )).'f" alt="" />';
}
$table->head[] = '<a href="user_bulk_display.php?sort='.$column.'&amp;dir='.$columndir.'">'.$strtitle.'</a>'.$columnicon;
$table->align[] = 'left';
......
......@@ -61,7 +61,7 @@ foreach ($columns as $column) {
$columndir = 'asc';
} else {
$columndir = ($dir == 'asc') ? 'desc' : 'asc';
$columnicon = ' <img src="'.$OUTPUT->old_icon_url('t/'.($dir == 'asc' ? 'down' : 'up' )).'" alt="" />';
$columnicon = ' <img src="'.$OUTPUT->pix_url('t/'.($dir == 'asc' ? 'down' : 'up' )).'" alt="" />';
}
$table->head[] = '<a href="user_bulk_enrol.php?sort='.$column.'&amp;dir='.$columndir.'">'.$strtitle.'</a>'.$columnicon;
$table->align[] = 'left';
......
......@@ -51,10 +51,10 @@ class block_activity_modules extends block_list {
foreach ($modfullnames as $modname => $modfullname) {
if ($modname === 'resources') {
$this->content->items[] = '<a href="'.$CFG->wwwroot.'/course/resources.php?id='.$course->id.'">'.$modfullname.'</a>';
$this->content->icons[] = '<img src="'.$OUTPUT->old_icon_url('f/html') . '" class="icon" alt="" />';
$this->content->icons[] = '<img src="'.$OUTPUT->pix_url('f/html') . '" class="icon" alt="" />';
} else {
$this->content->items[] = '<a href="'.$CFG->wwwroot.'/mod/'.$modname.'/index.php?id='.$course->id.'">'.$modfullname.'</a>';
$this->content->icons[] = '<img src="'.$OUTPUT->old_icon_url('icon', $modname) . '" class="icon" alt="" />';
$this->content->icons[] = '<img src="'.$OUTPUT->pix_url('icon', $modname) . '" class="icon" alt="" />';
}
}
......
......@@ -32,7 +32,7 @@ class block_admin extends block_list {
/// Course editing on/off
if ($course->id !== SITEID and has_capability('moodle/course:update', $this->page->context)) {
$this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/edit') . '" class="icon" alt="" />';
$this->content->icons[]='<img src="'.$OUTPUT->pix_url('i/edit') . '" class="icon" alt="" />';
if ($this->page->user_is_editing()) {
$this->content->items[]='<a href="view.php?id='.$course->id.'&amp;edit=off&amp;sesskey='.sesskey().'">'.get_string('turneditingoff').'</a>';
} else {
......@@ -40,17 +40,17 @@ class block_admin extends block_list {
}
$this->content->items[]='<a href="'.$CFG->wwwroot.'/course/edit.php?id='.$course->id.'">'.get_string('settings').'</a>';
$this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/settings') . '" class="icon" alt="" />';
$this->content->icons[]='<img src="'.$OUTPUT->pix_url('i/settings') . '" class="icon" alt="" />';
}
/// Assign roles to the course
if ($course->id != SITEID) {
if (has_capability('moodle/role:assign', $this->page->context)) {
$this->content->items[]='<a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/roles/assign.php?contextid='.$this->page->context->id.'">'.get_string('assignroles', 'role').'</a>';
$this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/roles') . '" class="icon" alt="" />';
$this->content->icons[]='<img src="'.$OUTPUT->pix_url('i/roles') . '" class="icon" alt="" />';
} else if (get_overridable_roles($this->page->context, ROLENAME_ORIGINAL)) {
$this->content->items[]='<a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/roles/override.php?contextid='.$this->page->context->id.'">'.get_string('overridepermissions', 'role').'</a>';
$this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/roles') . '" class="icon" alt="" />';
$this->content->icons[]='<img src="'.$OUTPUT->pix_url('i/roles') . '" class="icon" alt="" />';
}
}
......@@ -75,7 +75,7 @@ class block_admin extends block_list {
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="'.$OUTPUT->old_icon_url('i/grades') . '" class="icon" alt="" />';
$this->content->icons[]='<img src="'.$OUTPUT->pix_url('i/grades') . '" class="icon" alt="" />';
}
}
......@@ -83,7 +83,7 @@ class block_admin extends block_list {
if (!empty($CFG->enableoutcomes)) {
if ($course->id!==SITEID and has_capability('moodle/course:update', $this->page->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="'.$OUTPUT->old_icon_url('i/outcomes') . '" class="icon" alt="" />';
$this->content->icons[]='<img src="'.$OUTPUT->pix_url('i/outcomes') . '" class="icon" alt="" />';
}
}
......@@ -92,11 +92,11 @@ class block_admin extends block_list {
if (has_capability('moodle/course:managemetacourse', $this->page->context)) {
$strchildcourses = get_string('childcourses');
$this->content->items[]='<a href="importstudents.php?id='.$course->id.'">'.$strchildcourses.'</a>';
$this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/course') . '" class="icon" alt="" />';
$this->content->icons[]='<img src="'.$OUTPUT->pix_url('i/course') . '" class="icon" alt="" />';
} else if (has_capability('moodle/role:assign', $this->page->context)) {
$strchildcourses = get_string('childcourses');
$this->content->items[]='<span class="dimmed_text">'.$strchildcourses.'</span>';
$this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/course') . '" class="icon" alt="" />';
$this->content->icons[]='<img src="'.$OUTPUT->pix_url('i/course') . '" class="icon" alt="" />';
}
}
......@@ -105,37 +105,37 @@ class block_admin extends block_list {
if (($course->id!==SITEID) && ($course->groupmode || !$course->groupmodeforce) && has_capability('moodle/course:managegroups', $this->page->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="'.$OUTPUT->old_icon_url('i/group') . '" class="icon" alt="" />';
$this->content->icons[]='<img src="'.$OUTPUT->pix_url('i/group') . '" class="icon" alt="" />';
}
/// Backup this course
if ($course->id!==SITEID and has_capability('moodle/site:backup', $this->page->context)) {
$this->content->items[]='<a href="'.$CFG->wwwroot.'/backup/backup.php?id='.$course->id.'">'.get_string('backup').'</a>';
$this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/backup') . '" class="icon" alt="" />';
$this->content->icons[]='<img src="'.$OUTPUT->pix_url('i/backup') . '" class="icon" alt="" />';
}
/// Restore to this course
if ($course->id !== SITEID and has_capability('moodle/site:restore', $this->page->context)) {
$this->content->items[]='<a href="'.$CFG->wwwroot.'/files/index.php?id='.$course->id.'&amp;wdir=/backupdata">'.get_string('restore').'</a>';
$this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/restore') . '" class="icon" alt="" />';
$this->content->icons[]='<img src="'.$OUTPUT->pix_url('i/restore') . '" class="icon" alt="" />';
}
/// Import data from other courses
if ($course->id !== SITEID and has_capability('moodle/site:import', $this->page->context)) {
$this->content->items[]='<a href="'.$CFG->wwwroot.'/course/import.php?id='.$course->id.'">'.get_string('import').'</a>';
$this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/restore') . '" class="icon" alt="" />';
$this->content->icons[]='<img src="'.$OUTPUT->pix_url('i/restore') . '" class="icon" alt="" />';
}
/// Reset this course
if ($course->id!==SITEID and has_capability('moodle/course:reset', $this->page->context)) {
$this->content->items[]='<a href="'.$CFG->wwwroot.'/course/reset.php?id='.$course->id.'">'.get_string('reset').'</a>';
$this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/return') . '" class="icon" alt="" />';
$this->content->icons[]='<img src="'.$OUTPUT->pix_url('i/return') . '" class="icon" alt="" />';
}
/// View course reports
if ($course->id !== SITEID and has_capability('moodle/site:viewreports', $this->page->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="'.$OUTPUT->old_icon_url('i/stats') . '" class="icon" alt="" />';
$this->content->icons[]='<img src="'.$OUTPUT->pix_url('i/stats') . '" class="icon" alt="" />';
}
/// Manage questions
......@@ -161,7 +161,7 @@ class block_admin extends block_list {
if ($questionlink) {
$this->content->items[]='<a href="'.$CFG->wwwroot.'/question/'.$questionlink.
'?courseid='.$course->id.'">'.get_string('questions', 'quiz').'</a>';
$this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/questions') . '" class="icon" alt="" />';
$this->content->icons[]='<img src="'.$OUTPUT->pix_url('i/questions') . '" class="icon" alt="" />';
}
}
......@@ -170,13 +170,13 @@ class block_admin extends block_list {
$editabletypes = repository::get_editable_types($this->page->context);
if ($course->id !== SITEID && has_capability('moodle/course:update', $this->page->context) && !empty($editabletypes)) {
$this->content->items[]='<a href="'.$CFG->wwwroot.'/repository/manage_instances.php?contextid='.$this->page->context->id.'">'.get_string('repositories').'</a>';
$this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/repository') . '" alt=""/>';
$this->content->icons[]='<img src="'.$OUTPUT->pix_url('i/repository') . '" alt=""/>';
}
/// Manage files
if ($course->id !== SITEID and has_capability('moodle/course:managefiles', $this->page->context)) {
$this->content->items[]='<a href="'.$CFG->wwwroot.'/files/index.php?id='.$course->id.'">'.get_string('files').'</a>';
$this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/files') . '" class="icon" alt=""/>';
$this->content->icons[]='<img src="'.$OUTPUT->pix_url('i/files') . '" class="icon" alt=""/>';
}
/// Authorize hooks
......@@ -189,24 +189,24 @@ class block_admin extends block_list {
}
}
$this->content->items[] = $paymenturl;
$this->content->icons[] = '<img src="'.$OUTPUT->old_icon_url('i/payment') . '" class="icon" alt="" />';
$this->content->icons[] = '<img src="'.$OUTPUT->pix_url('i/payment') . '" class="icon" alt="" />';
}
/// Unenrol link
if (empty($course->metacourse) && ($course->id!==SITEID)) {
if (has_capability('moodle/legacy:guest', $this->page->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="'.$OUTPUT->old_icon_url('i/user') . '" class="icon" alt="" />';
$this->content->icons[]='<img src="'.$OUTPUT->pix_url('i/user') . '" class="icon" alt="" />';
} else if (has_capability('moodle/role:unassignself', $this->page->context, NULL, false) and get_user_roles($this->page->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="'.$OUTPUT->old_icon_url('i/user') . '" class="icon" alt="" />';
$this->content->icons[]='<img src="'.$OUTPUT->pix_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.'&amp;course='.$course->id.'">'.get_string('profile').'</a>';
$this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/user') . '" alt="" />';
$this->content->icons[]='<img src="'.$OUTPUT->pix_url('i/user') . '" alt="" />';
}
return $this->content;
......
......@@ -35,7 +35,7 @@ class block_admin_tree extends block_base {
$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="'.$OUTPUT->old_icon_url('i/open') . '" alt="'.$strfolderopened.'" /> ';
$this->tempcontent .= '<img id="vh_div'.$this->divcounter.'indicator" src="'.$OUTPUT->pix_url('i/open') . '" alt="'.$strfolderopened.'" /> ';
$this->tempcontent .= $visiblename.'</a></div><div id="vh_div'.$this->divcounter.'">'."\n";
$this->currentdepth++;
$this->divcounter++;
......@@ -61,7 +61,7 @@ class block_admin_tree extends block_base {
if ($content->is_hidden()) {
$class .= ' hidden';
}
$this->create_item($content->visiblename, $CFG->wwwroot.'/'.$CFG->admin.'/settings.php?section='.$content->name,$OUTPUT->old_icon_url('i/item'), $class);
$this->create_item($content->visiblename, $CFG->wwwroot.'/'.$CFG->admin.'/settings.php?section='.$content->name,$OUTPUT->pix_url('i/item'), $class);
}
} else if ($content instanceof admin_externalpage) {
// show hidden pages in tree if hidden page active
......@@ -75,7 +75,7 @@ class block_admin_tree extends block_base {
if ($content->is_hidden()) {
$class .= ' hidden';
}
$this->create_item($content->visiblename, $content->url, $OUTPUT->old_icon_url('i/item'), $class);
$this->create_item($content->visiblename, $content->url, $OUTPUT->pix_url('i/item'), $class);
}
} else if ($content instanceof admin_category) {
if ($content->check_access() and !$content->is_hidden()) {
......@@ -141,7 +141,7 @@ class block_admin_tree extends block_base {
$this->page->requires->js('blocks/admin_tree/admintree.js');
$this->page->requires->js_function_call('admin_tree.init',
array($this->divcounter - 1, $this->expandnodes,
$OUTPUT->old_icon_url('i/open'), $OUTPUT->old_icon_url('i/closed'),
$OUTPUT->pix_url('i/open'), $OUTPUT->pix_url('i/closed'),
get_string('folderopened'), get_string('folderclosed')));
$this->content = new object();
......
......@@ -24,7 +24,7 @@ class block_course_list extends block_list {
$this->content->icons = array();
$this->content->footer = '';
$icon = "<img src=\"" . $OUTPUT->old_icon_url('i/course') . "\"".
$icon = "<img src=\"" . $OUTPUT->pix_url('i/course') . "\"".
" class=\"icon\" alt=\"".get_string("coursecategory")."\" />";
$adminseesall = true;
......@@ -116,7 +116,7 @@ class block_course_list extends block_list {
return;
}
$icon = '<img src="'.$OUTPUT->old_icon_url('i/mnethost') . '" class="icon" alt="'.get_string('course').'" />';
$icon = '<img src="'.$OUTPUT->pix_url('i/mnethost') . '" class="icon" alt="'.get_string('course').'" />';
// only for logged in users!
if (!isloggedin() || isguestuser()) {
......
......@@ -35,7 +35,7 @@ class block_course_summary extends block_base {
} else {
$editpage = $CFG->wwwroot.'/course/edit.php?id='.$this->page->course->id;
}
$this->content->text .= "<div class=\"editbutton\"><a href=\"$editpage\"><img src=\"" . $OUTPUT->old_icon_url('t/edit') . "\" alt=\"".get_string('edit')."\" /></a></div>";
$this->content->text .= "<div class=\"editbutton\"><a href=\"$editpage\"><img src=\"" . $OUTPUT->pix_url('t/edit') . "\" alt=\"".get_string('edit')."\" /></a></div>";
}
$this->content->footer = '';
......
......@@ -163,7 +163,7 @@ class block_global_navigation_tree extends block_tree {
$reloadicon->link->url = $this->page->url;
$reloadicon->link->url->param('regenerate','navigation');
$reloadicon->link->add_class('customcommand');
$reloadicon->image->src = $OUTPUT->old_icon_url('t/reload');
$reloadicon->image->src = $OUTPUT->pix_url('t/reload');
$reloadicon->alt = get_string('reload');
$reloadicon->title = get_string('reload');
$this->content->footer .= $OUTPUT->action_icon($reloadicon);
......@@ -175,12 +175,12 @@ class block_global_navigation_tree extends block_tree {
$moveicon->link->add_classes('moveto customcommand requiresjs');
$moveicon->link->url = $this->page->url;
if ($this->docked) {
$moveicon->image->src = $OUTPUT->old_icon_url('t/movetoblock');
$moveicon->image->src = $OUTPUT->pix_url('t/movetoblock');
$moveicon->image->alt = $toggleblockdisplay;
$moveicon->image->title = $toggleblockdisplay;
$moveicon->link->url->param('undock', $this->instance->id);
} else {
$moveicon->image->src = $OUTPUT->old_icon_url('t/movetosidetab');
$moveicon->image->src = $OUTPUT->pix_url('t/movetosidetab');
$moveicon->image->alt = $togglesidetabdisplay;
$moveicon->image->title = $togglesidetabdisplay;
$moveicon->link->url->param('dock', $this->instance->id);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment