Skip to content

Commit

Permalink
MDL-62944 completion: Calendar capabilities should not be required
Browse files Browse the repository at this point in the history
The completion API should not require a user to have the capability to
add calendar events for it to function correctly.
  • Loading branch information
NeillM committed Aug 31, 2018
1 parent 79df6ae commit 1260ed9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions completion/classes/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public static function update_completion_date_event($cmid, $modulename, $instanc
$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);
Expand All @@ -115,7 +115,7 @@ public static function update_completion_date_event($cmid, $modulename, $instanc
$event->visible = instance_is_visible($modulename, $instance);
$event->timeduration = 0;

\calendar_event::create($event);
\calendar_event::create($event, false);
}
}

Expand Down

0 comments on commit 1260ed9

Please sign in to comment.