mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
MDL-50289 notes: No navigation to notes if the feature is disabled
This commit is contained in:
parent
803f565753
commit
e9acc1d6c5
@ -379,6 +379,13 @@ function note_view($context, $userid) {
|
||||
* @return bool
|
||||
*/
|
||||
function core_notes_myprofile_navigation(core_user\output\myprofile\tree $tree, $user, $iscurrentuser, $course) {
|
||||
global $CFG;
|
||||
|
||||
if (empty($CFG->enablenotes)) {
|
||||
// Notes are disabled, nothing to do.
|
||||
return false;
|
||||
}
|
||||
|
||||
$url = new moodle_url("/notes/index.php", array('user' => $user->id));
|
||||
$title = get_string('notes', 'core_notes');
|
||||
if (empty($course)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user