From c7697399d12474131f32cbd8a018fe9499648c50 Mon Sep 17 00:00:00 2001 From: Juan Leyva Date: Fri, 4 Sep 2015 10:36:45 +0200 Subject: [PATCH] MDL-51325 notes: Fix external get_course_notes to return site notes --- notes/externallib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);