MDL-58383 core_calendar: Correctly filter in event vault

The filter parameter was being passed in as the wrong argument which
was allowing non action events to be returned.

Part of MDL-55611 epic.
This commit is contained in:
Cameron Ball
2017-04-04 11:01:45 +01:00
committed by Dan Poltawski
parent de66ac3cd6
commit 8d4e0f29dc
@@ -207,6 +207,8 @@ class event_vault implements event_vault_interface {
[$user->id],
null,
null,
true,
true,
function ($event) {
return $event instanceof action_event_interface;
}
@@ -234,6 +236,8 @@ class event_vault implements event_vault_interface {
[$user->id],
null,
[$course->id],
true,
true,
function ($event) use ($course) {
return $event instanceof action_event_interface && $event->get_course()->get_id() == $course->id;
}