MDL-30901 report_progress Removing screenreader setting usage and adding a title...
authorDavid Monllao <davidm@moodle.com>
Mon, 17 Sep 2012 03:26:06 +0000 (11:26 +0800)
committerDavid Monllao <davidm@moodle.com>
Fri, 21 Sep 2012 01:22:21 +0000 (09:22 +0800)
lib/moodlelib.php
report/progress/index.php

index 2e3460f..0be25d9 100644 (file)
@@ -8815,11 +8815,9 @@ function get_browser_version_classes() {
  * @return bool True for yes, false for no
  */
 function can_use_rotated_text() {
-    global $USER;
-    return (check_browser_version('MSIE', 9) || check_browser_version('Firefox', 2) ||
+    return check_browser_version('MSIE', 9) || check_browser_version('Firefox', 2) ||
             check_browser_version('Chrome', 21) || check_browser_version('Safari', 536.25) ||
-            check_browser_version('Opera', 12) || check_browser_version('Safari iOS', 533)) &&
-            !$USER->screenreader;
+            check_browser_version('Opera', 12) || check_browser_version('Safari iOS', 533);
 }
 
 /**
index 7a979dc..8997c14 100644 (file)
@@ -326,12 +326,13 @@ foreach($activities as $activity) {
     if ($csv) {
         print $sep.csv_quote(strip_tags($activity->name)).$sep.csv_quote($datetext);
     } else {
+        $formattedactivityname = format_string($activity->name, true, array('context' => $context));
         print '<th scope="col" class="'.$activity->datepassedclass.'">'.
             '<a href="'.$CFG->wwwroot.'/mod/'.$activity->modname.
-            '/view.php?id='.$activity->id.'">'.
+            '/view.php?id='.$activity->id.'" title="' . $formattedactivityname . '">'.
             '<img src="'.$OUTPUT->pix_url('icon', $activity->modname).'" alt="'.
             get_string('modulename',$activity->modname).'" /> <span class="completion-activityname">'.
-            format_string($activity->name).'</span></a>';
+            $formattedactivityname.'</span></a>';
         if ($activity->completionexpected) {
             print '<div class="completion-expected"><span>'.$datetext.'</span></div>';
         }