mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
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:
parent
3f560e80ed
commit
2363b99e69
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user