From 806ebc150cd935f9e8b76c028b90ebca0fd3b50f Mon Sep 17 00:00:00 2001 From: nfreear Date: Tue, 2 Oct 2007 09:36:47 +0000 Subject: [PATCH] Fixes MDL-11161, Activity type text ... beginning of activity links in Screen Reader...moved to end (also MDL- 7436) --- course/lib.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/course/lib.php b/course/lib.php index d4374ecfdb..1f503ce1ad 100644 --- a/course/lib.php +++ b/course/lib.php @@ -1407,25 +1407,28 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false, $possaltname = $modinfo[$modnumber]->icon; $mimetype = mimeinfo_from_icon('type', $possaltname); - $altname = get_mimetype_description($mimetype); //get_string($mimetype, 'mimetypes'); + $altname = get_mimetype_description($mimetype); } else { $altname = $mod->modfullname; } } else { $altname = $mod->modfullname; } - // Avoid unnecessary duplication. if (false!==stripos($instancename, $altname)) { $altname = ''; } + // File type after name, for alphabetic lists (screen reader). + if ($altname) { + $altname = get_accesshide(' '.$altname); + } $linkcss = $mod->visible ? "" : " class=\"dimmed\" "; echo ''. - ''.$altname.' '. - $instancename.''; + ' '. + $instancename.$altname.''; + if (!empty($CFG->enablegroupings) && !empty($mod->groupingid) && has_capability('moodle/course:managegroups', get_context_instance(CONTEXT_COURSE, $course->id))) { echo " - ".format_string($groupings[$mod->groupingid]->name).''; } -- 2.39.5