diff --git a/notes/lib.php b/notes/lib.php index 7b86046f436..ea05994e0c2 100644 --- a/notes/lib.php +++ b/notes/lib.php @@ -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)) {