Skip to content

Commit

Permalink
MDL-51325 notes: Fix external get_course_notes to return site notes
Browse files Browse the repository at this point in the history
  • Loading branch information
jleyva committed Sep 4, 2015
1 parent 1dabede commit c769739
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion notes/externallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ public static function get_course_notes($courseid, $userid = 0) {
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);
Expand Down

0 comments on commit c769739

Please sign in to comment.