19 declare(strict_types=1);
38 $this->
lng = $DIC->language();
39 $this->
logger = $DIC->logger()->cal();
45 return 'cal_remote_reader';
50 $this->
lng->loadLanguageModule(
'dateplaner');
51 return $this->
lng->txt(
'cal_cronjob_remote_title');
56 $this->
lng->loadLanguageModule(
'dateplaner');
57 return $this->
lng->txt(
'cal_cronjob_remote_description');
74 $a_fields[
'cal_webcal_sync'] = $a_is_active ?
75 $this->
lng->txt(
'enabled') :
76 $this->
lng->txt(
'disabled');
88 return CronJobScheduleType::IN_MINUTES;
93 if ($this->calendar_settings ===
null) {
94 return self::DEFAULT_SYNC_HOURS;
96 return $this->calendar_settings->getWebCalSyncHours();
101 $status = JobResult::STATUS_NO_ACTION;
105 $status = JobResult::STATUS_CRASHED;
108 $reader->
setUser($remoteCalendar->getRemoteUser());
109 $reader->setPass($remoteCalendar->getRemotePass());
112 $reader->import($remoteCalendar);
114 $this->
logger->warning(
'Remote Calendar: ' . $remoteCalendar->getCategoryID());
115 $this->
logger->warning(
'Reading remote calendar failed with message: ' . $e->getMessage());
118 $remoteCalendar->update();
119 $status = JobResult::STATUS_OK;
123 $result->setStatus($status);
getDefaultScheduleValue()
Reader for remote ical calendars.
ilCalendarSettings $calendar_settings
static lookupRemoteCalendars()
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
addToExternalSettingsForm(int $a_form_id, array &$a_fields, bool $a_is_active)