Hello,
The best option to control content of "my" section and prevent users from changing settings is:
- Add in config.php this line:
$CFG->forcedefaultmymoodle = true;
Best regards,
Iban Cardona.
Tuesday, 25 July 2017
Thursday, 13 July 2017
Moodle: Change course name in breadcrumb
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!
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!
Subscribe to:
Posts (Atom)