Skip to content

Commit

Permalink
MDL-55611 icons: Remove pix_url
Browse files Browse the repository at this point in the history
Change to image_url because these are not "pix icons".
  • Loading branch information
Damyon Wiese authored and danpoltawski committed Apr 4, 2017
1 parent 569d091 commit 01a95b8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions blocks/myoverview/classes/output/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ public function export_for_template(renderer_base $output) {

$coursesummary = new course_summary($courses, $coursesprogress);
$coursesview = new courses_view($courses, $coursesprogress);
$nocoursesurl = $output->pix_url('courses', 'block_myoverview')->out();
$noeventsurl = $output->pix_url('activities', 'block_myoverview')->out();
$nocoursesurl = $output->image_url('courses', 'block_myoverview')->out();
$noeventsurl = $output->image_url('activities', 'block_myoverview')->out();

return [
'courses' => $coursesummary->export_for_template($output),
Expand Down
10 changes: 5 additions & 5 deletions calendar/classes/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -632,19 +632,19 @@ public static function add_event_metadata($event) {
} else {
$eventtype = '';
}
$icon = $OUTPUT->pix_url('icon', $event->modulename) . '';
$icon = $OUTPUT->image_url('icon', $event->modulename) . '';

$event->icon = '<img src="' . $icon . '" alt="' . $eventtype . '" title="' . $modulename . '" class="icon" />';
$event->referer = '<a href="' . $CFG->wwwroot . '/mod/' . $event->modulename . '/view.php?id=' .
$module->id . '">' . $event->name . '</a>';
$event->courselink = self::get_courselink($module->course);
$event->cmid = $module->id;
} else if ($event->courseid == SITEID) { // Site event.
$event->icon = '<img src="' . $OUTPUT->pix_url('i/siteevent') . '" alt="' .
$event->icon = '<img src="' . $OUTPUT->image_url('i/siteevent') . '" alt="' .
get_string('globalevent', 'calendar') . '" class="icon" />';
$event->cssclass = 'calendar_event_global';
} else if ($event->courseid != 0 && $event->courseid != SITEID && $event->groupid == 0) { // Course event.
$event->icon = '<img src="' . $OUTPUT->pix_url('i/courseevent') . '" alt="' .
$event->icon = '<img src="' . $OUTPUT->image_url('i/courseevent') . '" alt="' .
get_string('courseevent', 'calendar') . '" class="icon" />';
$event->courselink = self::get_courselink($event->courseid);
$event->cssclass = 'calendar_event_course';
Expand All @@ -654,12 +654,12 @@ public static function add_event_metadata($event) {
} else {
$groupname = '';
}
$event->icon = \html_writer::empty_tag('image', array('src' => $OUTPUT->pix_url('i/groupevent'),
$event->icon = \html_writer::empty_tag('image', array('src' => $OUTPUT->image_url('i/groupevent'),
'alt' => get_string('groupevent', 'calendar'), 'title' => $groupname, 'class' => 'icon'));
$event->courselink = self::get_courselink($event->courseid) . ', ' . $groupname;
$event->cssclass = 'calendar_event_group';
} else if ($event->userid) { // User event.
$event->icon = '<img src="' . $OUTPUT->pix_url('i/userevent') . '" alt="' .
$event->icon = '<img src="' . $OUTPUT->image_url('i/userevent') . '" alt="' .
get_string('userevent', 'calendar') . '" class="icon" />';
$event->cssclass = 'calendar_event_user';
}
Expand Down

0 comments on commit 01a95b8

Please sign in to comment.