Permalink
Browse files

MDL-21619 - add label to activities and resources icons.

  • Loading branch information...
1 parent bd536f5 commit 3aa11c75c39bab08dae75a6528931ed8c053888d @rwijaya rwijaya committed Jul 23, 2010
Showing with 8 additions and 8 deletions.
  1. +2 −2 course/lib.php
  2. +2 −2 course/resources.php
  3. +2 −2 lib/navigationlib.php
  4. +1 −1 mod/resource/index.php
  5. +1 −1 mod/url/index.php
View
@@ -1435,7 +1435,7 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false,
echo '<a '.$linkcss.' '.$extra.
' href="'.$CFG->wwwroot.'/mod/'.$mod->modname.'/view.php?id='.$mod->id.'">'.
- '<img src="'.$icon.'" class="activityicon" alt="" /> '.
+ '<img src="'.$icon.'" class="activityicon" alt="'.get_string('modulename',$mod->modname).'" /> '.
$accesstext.'<span>'.$instancename.$altname.'</span></a>';
if (!empty($mod->groupingid) && has_capability('moodle/course:managegroups', get_context_instance(CONTEXT_COURSE, $course->id))) {
@@ -1448,7 +1448,7 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false,
// Display greyed-out text of link
echo '<span class="dimmed_text" '.$extra.' ><span class="accesshide">'.
get_string('notavailableyet','condition').': </span>'.
- '<img src="'.$icon.'" class="activityicon" alt="" /> <span>'.
+ '<img src="'.$icon.'" class="activityicon" alt="'.get_string('modulename', $mod->modname).'" /> <span>'.
$instancename.$altname.'</span></span>';
}
}
View
@@ -125,9 +125,9 @@
$extra = empty($cm->extra) ? '' : $cm->extra;
if (!empty($cm->icon)) {
- $icon = '<img src="'.$OUTPUT->pix_url($cm->icon).'" class="activityicon" alt="" /> ';
+ $icon = '<img src="'.$OUTPUT->pix_url($cm->icon).'" class="activityicon" alt="'.get_string('modulename', $cm->modname).'" /> ';
} else {
- $icon = '<img src="'.$OUTPUT->pix_url('icon', $cm->modname).'" class="activityicon" alt="" /> ';
+ $icon = '<img src="'.$OUTPUT->pix_url('icon', $cm->modname).'" class="activityicon" alt="'.get_string('modulename', $cm->modname).'" /> ';
}
$class = $cm->visible ? '' : 'class="dimmed"'; // hidden modules are dimmed
View
@@ -1367,9 +1367,9 @@ protected function load_section_activities(navigation_node $sectionnode, $sectio
continue;
}
if ($cm->icon) {
- $icon = new pix_icon($cm->icon, '', $cm->iconcomponent);
+ $icon = new pix_icon($cm->icon, get_string('modulename', $cm->modname), $cm->iconcomponent);
} else {
- $icon = new pix_icon('icon', '', $cm->modname);
+ $icon = new pix_icon('icon', get_string('modulename', $cm->modname), $cm->modname);
}
$url = new moodle_url('/mod/'.$cm->modname.'/view.php', array('id'=>$cm->id));
$activitynode = $sectionnode->add($cm->name, $url, navigation_node::TYPE_ACTIVITY, $cm->name, $cm->id, $icon);
View
@@ -91,7 +91,7 @@
$icon = '';
if (!empty($cm->icon)) {
// each resource file has an icon in 2.0
- $icon = '<img src="'.$OUTPUT->pix_url($cm->icon).'" class="activityicon" alt="" /> ';
+ $icon = '<img src="'.$OUTPUT->pix_url($cm->icon).'" class="activityicon" alt="'.get_string('modulename', $cm->modname).'" /> ';
}
$class = $resource->visible ? '' : 'class="dimmed"'; // hidden modules are dimmed
View
@@ -91,7 +91,7 @@
$icon = '';
if (!empty($cm->icon)) {
// each url has an icon in 2.0
- $icon = '<img src="'.$OUTPUT->pix_url($cm->icon).'" class="activityicon" alt="" /> ';
+ $icon = '<img src="'.$OUTPUT->pix_url($cm->icon).'" class="activityicon" alt="'.get_string('modulename', $cm->modname).'" /> ';
}
$class = $url->visible ? '' : 'class="dimmed"'; // hidden modules are dimmed

0 comments on commit 3aa11c7

Please sign in to comment.