Skip to content

Commit

Permalink
MDL-17883 Added title attribute to grade item link. Merged from MOODL…
Browse files Browse the repository at this point in the history
…E_19_STABLE
  • Loading branch information
nicolasconnault committed Jan 16, 2009
1 parent d7c2ac1 commit dab9f42
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions grade/lib.php
Expand Up @@ -860,7 +860,8 @@ public function get_element_header(&$element, $withlink=false, $icon=true, $spac
$header .= $this->get_element_icon($element, $spacerifnone);
}

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

if ($element['type'] != 'item' and $element['type'] != 'categoryitem' and $element['type'] != 'courseitem') {
return $header;
Expand All @@ -881,7 +882,7 @@ public function get_element_header(&$element, $withlink=false, $icon=true, $spac
$url = $CFG->wwwroot.'/mod/'.$itemmodule.'/view.php?id='.$cm->id;
}

$header = '<a href="'.$url.'">'.$header.'</a>';
$header = '<a href="'.$url.'" title="'.$title.'">'.$header.'</a>';
}
}

Expand Down

0 comments on commit dab9f42

Please sign in to comment.