Skip to content

Commit

Permalink
MDL-50289 notes: No navigation to notes if the feature is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
mudrd8mz committed May 25, 2015
1 parent 803f565 commit e9acc1d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions notes/lib.php
Expand Up @@ -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)) {
Expand Down

0 comments on commit e9acc1d

Please sign in to comment.