Skip to content

Commit

Permalink
MDL-65703 core_calendar: fix user event type filtering logic
Browse files Browse the repository at this point in the history
  • Loading branch information
grabs authored and lameze committed Jun 4, 2019
1 parent 29c3951 commit 5d38405
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions calendar/managesubscriptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@
$usedefaultfilters = true;
if (!empty($courseid) && $courseid == SITEID && !empty($types['site'])) {
$searches[] = "(eventtype = 'site')";
$usedefaultfilters = false;
}

if (!empty($types['user'])) {
$searches[] = "(eventtype = 'user' AND userid = :userid)";
$params['userid'] = $USER->id;
$usedefaultfilters = false;
Expand Down

0 comments on commit 5d38405

Please sign in to comment.