MDL-58424 core_calendar: moved logic from api.php to lib.php

Also moved related PHPUnit tests.

Part of MDL-55611 epic.
This commit is contained in:
Mark Nelson
2017-04-04 11:01:52 +01:00
committed by Dan Poltawski
parent 10515e152d
commit 23a29de7ee
23 changed files with 2111 additions and 2601 deletions
+1 -1
View File
@@ -62,7 +62,7 @@ class calendar_cron_task extends scheduled_task {
foreach ($subscriptions as $sub) {
mtrace("Updating calendar subscription {$sub->name} in course {$sub->courseid}");
try {
$log = \core_calendar\api::update_subscription_events($sub->id);
$log = calendar_update_subscription_events($sub->id);
mtrace(trim(strip_tags($log)));
} catch (\moodle_exception $ex) {
mtrace('Error updating calendar subscription: ' . $ex->getMessage());