From 2363b99e691e363f3654241e31e5fb09e8f835c0 Mon Sep 17 00:00:00 2001 From: Neill Magill Date: Thu, 19 Jul 2018 10:46:02 +0100 Subject: [PATCH] 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. --- completion/classes/api.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/completion/classes/api.php b/completion/classes/api.php index f8040c5864c..b569e3791d1 100644 --- a/completion/classes/api.php +++ b/completion/classes/api.php @@ -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); } }