diff --git a/blocks/activity_modules/block_activity_modules.php b/blocks/activity_modules/block_activity_modules.php index 75cfe1afeef6c..9cc7c548017d7 100644 --- a/blocks/activity_modules/block_activity_modules.php +++ b/blocks/activity_modules/block_activity_modules.php @@ -49,11 +49,11 @@ function get_content() { foreach ($modfullnames as $modname => $modfullname) { if ($modname === 'resources') { - $this->content->items[] = ''.$modfullname.''; - $this->content->icons[] = ''; + $icon = ' '; + $this->content->items[] = ''.$icon.$modfullname.''; } else { - $this->content->items[] = ''.$modfullname.''; - $this->content->icons[] = ''; + $icon = ' '; + $this->content->items[] = ''.$icon.$modfullname.''; } } diff --git a/blocks/community/block_community.php b/blocks/community/block_community.php index 1af1fa41769b6..f70c4888e7942 100644 --- a/blocks/community/block_community.php +++ b/blocks/community/block_community.php @@ -62,15 +62,14 @@ function get_content() { if (!isloggedin()) { return $this->content; } - + + $icon = html_writer::empty_tag('img', array('src' => $OUTPUT->pix_url('i/group'), + 'class' => 'icon', 'alt' => get_string('addcourse', 'block_community'))); $addcourseurl = new moodle_url('/blocks/community/communitycourse.php', array('add' => true, 'courseid' => $this->page->course->id)); - $searchlink = html_writer::tag('a', get_string('addcourse', 'block_community'), + $searchlink = html_writer::tag('a', $icon .' '.get_string('addcourse', 'block_community'), array('href' => $addcourseurl->out(false))); $this->content->items[] = $searchlink; - $icon = html_writer::empty_tag('img', array('src' => $OUTPUT->pix_url('i/group'), - 'class' => 'icon', 'alt' => get_string('addcourse', 'block_community'))); - $this->content->icons[] = $icon; require_once($CFG->dirroot . '/blocks/community/locallib.php'); $communitymanager = new block_community_manager(); diff --git a/blocks/course_list/block_course_list.php b/blocks/course_list/block_course_list.php index 8bbc8ff9eae9f..52fc182614942 100644 --- a/blocks/course_list/block_course_list.php +++ b/blocks/course_list/block_course_list.php @@ -23,8 +23,7 @@ function get_content() { $this->content->icons = array(); $this->content->footer = ''; - $icon = "pix_url('i/course') . "\"". - " class=\"icon\" alt=\"".get_string("coursecategory")."\" />"; + $icon = ' '; $adminseesall = true; if (isset($CFG->block_course_list_adminview)) { @@ -39,8 +38,7 @@ function get_content() { foreach ($courses as $course) { $linkcss = $course->visible ? "" : " class=\"dimmed\" "; $this->content->items[]="shortname) . "\" ". - "href=\"$CFG->wwwroot/course/view.php?id=$course->id\">" . format_string($course->fullname) . ""; - $this->content->icons[]=$icon; + "href=\"$CFG->wwwroot/course/view.php?id=$course->id\">".$icon.format_string($course->fullname). ""; } $this->title = get_string('mycourses'); /// If we can update any course of the view all isn't hidden, show the view all courses link @@ -59,8 +57,7 @@ function get_content() { if (count($categories) > 1 || (count($categories) == 1 && $DB->count_records('course') > 200)) { // Just print top level category links foreach ($categories as $category) { $linkcss = $category->visible ? "" : " class=\"dimmed\" "; - $this->content->items[]="wwwroot/course/category.php?id=$category->id\">" . format_string($category->name) . ""; - $this->content->icons[]=$icon; + $this->content->items[]="wwwroot/course/category.php?id=$category->id\">".$icon . format_string($category->name) . ""; } /// If we can update any course of the view all isn't hidden, show the view all courses link if (has_capability('moodle/course:update', get_context_instance(CONTEXT_SYSTEM)) || empty($CFG->block_course_list_hideallcourseslink)) { @@ -78,8 +75,7 @@ function get_content() { $this->content->items[]="shortname)."\" ". "href=\"$CFG->wwwroot/course/view.php?id=$course->id\">" - . format_string($course->fullname) . ""; - $this->content->icons[]=$icon; + .$icon. format_string($course->fullname) . ""; } /// If we can update any course of the view all isn't hidden, show the view all courses link if (has_capability('moodle/course:update', get_context_instance(CONTEXT_SYSTEM)) || empty($CFG->block_course_list_hideallcourseslink)) { @@ -110,7 +106,7 @@ function get_remote_courses() { return; } - $icon = ''.get_string('course').''; + $icon = ' '; // shortcut - the rest is only for logged in users! if (!isloggedin() || isguestuser()) { @@ -123,8 +119,7 @@ function get_remote_courses() { foreach ($courses as $course) { $this->content->items[]="shortname) . "\" ". "href=\"{$CFG->wwwroot}/auth/mnet/jump.php?hostid={$course->hostid}&wantsurl=/course/view.php?id={$course->remoteid}\">" - . format_string($course->fullname) . ""; - $this->content->icons[]=$icon; + .$icon. format_string($course->fullname) . ""; } // if we listed courses, we are done return true; @@ -134,8 +129,7 @@ function get_remote_courses() { $this->content->items[] = get_string('remotehosts', 'mnet'); $this->content->icons[] = ''; foreach($USER->mnet_foreign_host_array as $somehost) { - $this->content->items[] = $somehost['count'].get_string('courseson','mnet').''.$somehost['name'].''; - $this->content->icons[] = $icon; + $this->content->items[] = $somehost['count'].get_string('courseson','mnet').''.$icon.$somehost['name'].''; } // if we listed hosts, done return true; diff --git a/blocks/feedback/block_feedback.php b/blocks/feedback/block_feedback.php index 825f67859db52..75a5126b3312a 100644 --- a/blocks/feedback/block_feedback.php +++ b/blocks/feedback/block_feedback.php @@ -47,8 +47,8 @@ function get_content() { foreach ($feedbacks as $feedback) { $url = new moodle_url($baseurl); $url->params(array('id'=>$feedback->cmid, 'courseid'=>$courseid)); - $this->content->text = ''; - $this->content->text .= ' '.$feedback->name.''; + $icon = ' '; + $this->content->text = ' '.$icon.$feedback->name.''; } } diff --git a/blocks/mnet_hosts/block_mnet_hosts.php b/blocks/mnet_hosts/block_mnet_hosts.php index 98cf00dc72de2..23ea4cbc610f2 100644 --- a/blocks/mnet_hosts/block_mnet_hosts.php +++ b/blocks/mnet_hosts/block_mnet_hosts.php @@ -88,16 +88,15 @@ function get_content() { if ($hosts) { foreach ($hosts as $host) { - $icon = ''.get_string('server', 'block_mnet_hosts').''; + $icon = ''.get_string('server', 'block_mnet_hosts').' '; - $this->content->icons[]=$icon; if ($host->id == $USER->mnethostid) { $this->content->items[]="name). - "\" href=\"{$host->wwwroot}\">". s($host->name) .""; + "\" href=\"{$host->wwwroot}\">".$icon. s($host->name) .""; } else { $this->content->items[]="name). - "\" href=\"{$CFG->wwwroot}/auth/mnet/jump.php?hostid={$host->id}\">" . s($host->name) .""; + "\" href=\"{$CFG->wwwroot}/auth/mnet/jump.php?hostid={$host->id}\">" .$icon. s($host->name) .""; } } } diff --git a/blocks/participants/block_participants.php b/blocks/participants/block_participants.php index 7a056ca2f84e1..d604f243955e0 100644 --- a/blocks/participants/block_participants.php +++ b/blocks/participants/block_participants.php @@ -33,10 +33,9 @@ function get_content() { return $this->content; } } - + $icon = ' '; $this->content->items[] = ''.get_string('participants').''; - $this->content->icons[] = ''; + $CFG->wwwroot.'/user/index.php?contextid='.$currentcontext->id.'">'.$icon.get_string('participants').''; return $this->content; } diff --git a/blocks/private_files/renderer.php b/blocks/private_files/renderer.php index 58ec15d5c1caf..b75475288fcb5 100644 --- a/blocks/private_files/renderer.php +++ b/blocks/private_files/renderer.php @@ -68,7 +68,7 @@ protected function htmllize_tree($tree, $dir) { $filename = $file->get_filename(); $icon = mimeinfo("icon", $filename); $image = $this->output->pix_icon("f/$icon", $filename, 'moodle', array('class'=>'icon')); - $result .= '
  • '.$image.' '.html_writer::link($url, $filename).'
  • '; + $result .= '
  • '.html_writer::link($url, $image.' '.$filename).'
  • '; } $result .= ''; diff --git a/blocks/site_main_menu/block_site_main_menu.php b/blocks/site_main_menu/block_site_main_menu.php index 5f8891bcc0237..75419a1447310 100644 --- a/blocks/site_main_menu/block_site_main_menu.php +++ b/blocks/site_main_menu/block_site_main_menu.php @@ -45,15 +45,15 @@ function get_content() { } else { $linkcss = $cm->visible ? '' : ' class="dimmed" '; $instancename = format_string($cm->name, true, $course->id); - $this->content->items[] = 'extra. - ' href="'.$CFG->wwwroot.'/mod/'.$cm->modname.'/view.php?id='.$cm->id.'">'.$instancename.''; //Accessibility: incidental image - should be empty Alt text if (!empty($cm->icon)) { $icon = $OUTPUT->pix_url($cm->icon); } else { $icon = $OUTPUT->pix_url('icon', $cm->modname); } - $this->content->icons[] = ''; + $icon = ' '; + $this->content->items[] = 'extra. + ' href="'.$CFG->wwwroot.'/mod/'.$cm->modname.'/view.php?id='.$cm->id.'">'.$icon.$instancename.''; } } } @@ -130,10 +130,10 @@ function get_content() { $this->content->items[] = format_text($extra, FORMAT_HTML).$editbuttons; $this->content->icons[] = ''; } else { - $this->content->items[] = ''.$instancename.''.$editbuttons; //Accessibility: incidental image - should be empty Alt text - $this->content->icons[] = ''; + $icon = ' '; + $this->content->items[] = ''.$icon.$instancename.''.$editbuttons; } } } diff --git a/blocks/social_activities/block_social_activities.php b/blocks/social_activities/block_social_activities.php index af533f8b34954..2e30c205397e3 100644 --- a/blocks/social_activities/block_social_activities.php +++ b/blocks/social_activities/block_social_activities.php @@ -47,15 +47,15 @@ function get_content() { } else { $linkcss = $cm->visible ? '' : ' class="dimmed" '; $instancename = format_string($cm->name, true, $course->id); - $this->content->items[] = 'extra. - ' href="'.$CFG->wwwroot.'/mod/'.$cm->modname.'/view.php?id='.$cm->id.'">'.$instancename.''; //Accessibility: incidental image - should be empty Alt text if (!empty($cm->icon)) { $icon = $OUTPUT->pix_url($cm->icon); } else { $icon = $OUTPUT->pix_url('icon', $cm->modname); } - $this->content->icons[] = ''; + $icon = ' '; + $this->content->items[] = 'extra. + ' href="'.$CFG->wwwroot.'/mod/'.$cm->modname.'/view.php?id='.$cm->id.'">'.$icon.$instancename.''; } } } @@ -139,10 +139,10 @@ function get_content() { $this->content->items[] = format_text($extra, FORMAT_HTML).$editbuttons; $this->content->icons[] = ''; } else { - $this->content->items[] = ''.$instancename.''.$editbuttons; //Accessibility: incidental image - should be empty Alt text - $this->content->icons[] = ''; + $icon = ' '; + $this->content->items[] = ''.$icon.$instancename.''.$editbuttons; } } }