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-07-19 10:46:02 +01:00
parent 3f560e80ed
commit 2363b99e69

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);
}
}