Index: grade/lib.php
=========================================================
--- grade/lib.php	(revision 1.120.2.22)
+++ grade/lib.php	Sat Feb 07 09:46:33 CET 2009
@@ -783,7 +981,8 @@
             case 'courseitem':
             case 'categoryitem':
                 if ($element['object']->is_calculated()) {
-                    return '<img src="'.$CFG->pixpath.'/i/calc.gif" class="icon itemicon" alt="'.get_string('calculation', 'grades').'"/>';
+                    $strcalc = get_string('calculatedgrade', 'grades');
+                    return '<img src="'.$CFG->pixpath.'/i/calc.gif" class="icon itemicon" title="'.$strcalc.'" alt="'.$strcalc.'"/>';

                 } else if (($element['object']->is_course_item() or $element['object']->is_category_item())
                   and ($element['object']->gradetype == GRADE_TYPE_SCALE or $element['object']->gradetype == GRADE_TYPE_VALUE)) {
@@ -794,27 +993,32 @@
                             case GRADE_AGGREGATE_WEIGHTED_MEAN:
                             case GRADE_AGGREGATE_WEIGHTED_MEAN2:
                             case GRADE_AGGREGATE_EXTRACREDIT_MEAN:
-                                return '<img src="'.$CFG->pixpath.'/i/agg_mean.gif" class="icon itemicon" alt="'.get_string('aggregation', 'grades').'"/>';
+                                $stragg = get_string('aggregation', 'grades');
+                                return '<img src="'.$CFG->pixpath.'/i/agg_mean.gif" class="icon itemicon" title="'.$stragg.'" alt="'.$stragg.'"/>';
                             case GRADE_AGGREGATE_SUM:
-                                return '<img src="'.$CFG->pixpath.'/i/agg_sum.gif" class="icon itemicon" alt="'.get_string('aggregation', 'grades').'"/>';
+                                $stragg = get_string('aggregation', 'grades');
+                                return '<img src="'.$CFG->pixpath.'/i/agg_sum.gif" class="icon itemicon" title="'.$stragg.'" alt="'.$stragg.'"/>';
                         }
                     }

                 } else if ($element['object']->itemtype == 'mod') {
-                    return '<img src="'.$CFG->modpixpath.'/'.$element['object']->itemmodule.'/icon.gif" class="icon itemicon" alt="'
-                           .get_string('modulename', $element['object']->itemmodule).'"/>';
+                    $strmodname = get_string('modulename', $element['object']->itemmodule);
+                    return '<img src="'.$CFG->modpixpath.'/'.$element['object']->itemmodule.'/icon.gif" class="icon itemicon" title="' .$strmodname.'" alt="' .$strmodname.'"/>';

                 } else if ($element['object']->itemtype == 'manual') {
                     if ($element['object']->is_outcome_item()) {
-                        return '<img src="'.$CFG->pixpath.'/i/outcomes.gif" class="icon itemicon" alt="'.get_string('outcome', 'grades').'"/>';
+                        $stroutcome = get_string('outcome', 'grades');
+                        return '<img src="'.$CFG->pixpath.'/i/outcomes.gif" class="icon itemicon" title="'.$stroutcome.'" alt="'.$stroutcome.'"/>';
                     } else {
-                        return '<img src="'.$CFG->pixpath.'/t/manual_item.gif" class="icon itemicon" alt="'.get_string('manualitem', 'grades').'"/>';
+                        $strmanual = get_string('manualitem', 'grades');
+                        return '<img src="'.$CFG->pixpath.'/t/manual_item.gif" class="icon itemicon" title="'.$strmanual.'" alt="'.$strmanual.'"/>';
                     }
                 }
                 break;

             case 'category':
-                return '<img src="'.$CFG->pixpath.'/f/folder.gif" class="icon itemicon" alt="'.get_string('category', 'grades').'"/>';
+                $strcat = get_string('category', 'grades');
+                return '<img src="'.$CFG->pixpath.'/f/folder.gif" class="icon itemicon" title="'.$strcat.'" alt="'.$strcat.'" />';
         }

         if ($spacerifnone) {
@@ -841,8 +1045,7 @@
             $header .= $this->get_element_icon($element, $spacerifnone);
         }

-        $title = $element['object']->get_name();
-        $header .= $title;
+        $header .= $element['object']->get_name();

         if ($element['type'] != 'item' and $element['type'] != 'categoryitem' and $element['type'] != 'courseitem') {
             return $header;
@@ -855,6 +1058,8 @@
         if ($withlink and $itemtype=='mod' and $iteminstance and $itemmodule) {
             if ($cm = get_coursemodule_from_instance($itemmodule, $iteminstance, $this->courseid)) {

+                $a->name = get_string('modulename', $element['object']->itemmodule);
+                $title = get_string('linktoactivity', 'grades', $a);
                 $dir = $CFG->dirroot.'/mod/'.$itemmodule;

                 if (file_exists($dir.'/grade.php')) {

Index: grade/report/lib.php
=========================================================
--- grade/report/lib.php	(revision 1.30.2.10)
+++ grade/report/lib.php	Sat Feb 07 09:45:28 CET 2009
@@ -308,10 +310,11 @@
      * @param string HTML
      */
     function get_sort_arrow($direction='move', $sort_link=null) {
-        $matrix = array('up' => 'asc', 'down' => 'desc', 'move' => 'desc');
+        $matrix = array('up' => 'desc', 'down' => 'asc', 'move' => 'desc');
         $strsort = $this->get_lang_string('sort' . $matrix[$direction]);
+
         $arrow = print_arrow($direction, $strsort, true);
-        $html = '<a href="'.$sort_link .'">' . $arrow . '</a>';
+        $html = '<a href="'.$sort_link .'" alt="'.$strsort.'" title="'.$strsort.'">' . $arrow . '</a>';
         return $html;
     }
 }
Index: lang/en_utf8/grades.php
=========================================================
--- lang/en_utf8/grades.php	(revision 1.111.2.60)
+++ lang/en_utf8/grades.php	Sat Feb 07 09:10:06 CET 2009
@@ -48,9 +50,10 @@
 $string['averagesdisplaytype'] = 'Column averages display type';
 $string['backupwithoutgradebook'] = 'Backup does not contain Gradebook configuration';
 $string['badgrade'] = 'Supplied grade is invalid';
 $string['baduser'] = 'Supplied user is invalid';
 $string['bonuspoints'] = 'Bonus points';
 $string['bulkcheckboxes'] = 'Bulk checkboxes';
+$string['calculatedgrade'] = 'Calculated grade';
 $string['calculation'] = 'Calculation';
 $string['calculationadd'] = 'Add calculation';
 $string['calculationedit'] = 'Edit calculation';
@@ -305,6 +315,7 @@
 $string['letters'] = 'Letters';
 $string['linkedactivity'] = 'Linked activity';
 $string['linkedactivityhelp'] = 'Specifies an optional activity to which this outcome item is linked. This is used to measure student performance on criteria not assessed by the activity grade.';
+$string['linktoactivity'] = 'Link to $a->name activity';
 $string['lock'] = 'Lock';
 $string['locked'] = 'Locked';
 $string['locktime'] = 'Lock after';
