Hello,
If you want to modify the text of the a course in the breadcrumb you can do this (tested in Moodle 3.2):
Add this function in your file lib.php of your local plugin:
function local_yourlocalplugin_extend_navigation(global_navigation $nav) {
global $COURSE, $CFG;
if (isset($COURSE->id) && $COURSE->id > 0) {
$coursenode = $nav->find($COURSE->id, navigation_node::TYPE_COURSE);
if ($coursenode) {
$coursenode->text .= ' My extra text';
}
}
}
Best regards!
No comments:
Post a Comment