mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-39388 corrected tabs renderer to deal with old code
This commit is contained in:
parent
9a2cc7b6c8
commit
bb7368a29b
1 changed files with 7 additions and 1 deletions
|
@ -197,7 +197,13 @@ class theme_bootstrapbase_core_renderer extends core_renderer {
|
|||
} else if ($tab->inactive) {
|
||||
return html_writer::tag('li', html_writer::tag('a', $tab->text), array('class' => 'disabled'));
|
||||
} else {
|
||||
return html_writer::tag('li', html_writer::tag('a', $tab->text, array('href' => $tab->link)));
|
||||
if (!($tab->link instanceof moodle_url)) {
|
||||
// backward compartibility when link was passed as quoted string
|
||||
$link = "<a href=\"$tab->link\" title=\"$tab->title\">$tab->text</a>";
|
||||
} else {
|
||||
$link = html_writer::link($tab->link, $tab->text, array('title' => $tab->title));
|
||||
}
|
||||
return html_writer::tag('li', $link);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue