MDL-62944 completion: Calendar capabilities should not be required

The completion API should not require a user to have the capability to
add calendar events for it to function correctly.
This commit is contained in:
Neill Magill
2018-08-31 10:17:52 +01:00
parent 79df6aee8c
commit 1260ed9e33
+2 -2
View File
@@ -94,7 +94,7 @@ class api {
$event->timeduration = 0;
$calendarevent = \calendar_event::load($event->id);
$calendarevent->update($event);
$calendarevent->update($event, false);
} else {
// Calendar event is no longer needed.
$calendarevent = \calendar_event::load($event->id);
@@ -115,7 +115,7 @@ class api {
$event->visible = instance_is_visible($modulename, $instance);
$event->timeduration = 0;
\calendar_event::create($event);
\calendar_event::create($event, false);
}
}