diff --git a/notes/externallib.php b/notes/externallib.php index 13ca62df77f..fab1f22f20b 100644 --- a/notes/externallib.php +++ b/notes/externallib.php @@ -545,7 +545,7 @@ class core_notes_external extends external_api { if ($course->id != SITEID) { require_capability('moodle/notes:view', $context); - $sitenotes = self::create_note_list($course->id, $context, $params['userid'], NOTES_STATE_SITE); + $sitenotes = self::create_note_list(0, context_system::instance(), $params['userid'], NOTES_STATE_SITE); $coursenotes = self::create_note_list($course->id, $context, $params['userid'], NOTES_STATE_PUBLIC); $personalnotes = self::create_note_list($course->id, $context, $params['userid'], NOTES_STATE_DRAFT, $USER->id);