MDL-47310 gradebook: accessibility improvements

This commit is contained in:
Jetha Chan 2014-10-30 13:28:15 +08:00
parent b7ff40301d
commit 43cd76e848
6 changed files with 94 additions and 14 deletions

View file

@ -1351,15 +1351,14 @@ class grade_structure {
return $header;
}
if ($withlink) {
$url = $this->get_activity_link($element);
if ($url) {
$a = new stdClass();
$a->name = get_string('modulename', $element['object']->itemmodule);
$title = get_string('linktoactivity', 'grades', $a);
if ($withlink && $url = $this->get_activity_link($element)) {
$a = new stdClass();
$a->name = get_string('modulename', $element['object']->itemmodule);
$title = get_string('linktoactivity', 'grades', $a);
$header = html_writer::link($url, $header, array('title' => $title));
}
$header = html_writer::link($url, $header, array('title' => $title));
} else {
$header = html_writer::span($header);
}
if ($withdescription) {