]> git.mjollnir.org Git - moodle.git/commitdiff
fix for MDL-7436, indicate resource type in the text link.
authortoyomoyo <toyomoyo>
Tue, 28 Nov 2006 02:22:17 +0000 (02:22 +0000)
committertoyomoyo <toyomoyo>
Tue, 28 Nov 2006 02:22:17 +0000 (02:22 +0000)
course/lib.php

index a23096959c3f33b87caf124ad1f39877fe271330..3bcfd8a2b7b8795343d701d00ccb071f8cc475ee 100644 (file)
@@ -1158,12 +1158,19 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false,
                     }
 
                 } else { // Normal activity
+                
+                    if ($USER->screenreader) {
+                        $typestring = '('.get_string('modulename',$mod->modname).') ';
+                    } else {
+                        $typestring = '';
+                    }
+                
                     $linkcss = $mod->visible ? "" : " class=\"dimmed\" ";
                     echo '<img src="'.$icon.'"'.
                          ' class="activityicon" alt="'.$mod->modfullname.'" />'.
                          ' <a title="'.$mod->modfullname.'" '.$linkcss.' '.$extra.
                          ' href="'.$CFG->wwwroot.'/mod/'.$mod->modname.'/view.php?id='.$mod->id.'">'.
-                         $instancename.'</a>';
+                         $typestring.$instancename.'</a>';
                 }
                 if ($usetracking && $mod->modname == 'forum') {
                     $groupmode = groupmode($course, $mod);