19 declare(strict_types=1);
36 $this->
lng = $DIC->language();
37 $this->
logger = $DIC->logger()->cal();
43 return 'cal_remote_reader';
48 $this->
lng->loadLanguageModule(
'dateplaner');
49 return $this->
lng->txt(
'cal_cronjob_remote_title');
54 $this->
lng->loadLanguageModule(
'dateplaner');
55 return $this->
lng->txt(
'cal_cronjob_remote_description');
72 $a_fields[
'cal_webcal_sync'] = $a_is_active ?
73 $this->
lng->txt(
'enabled') :
74 $this->
lng->txt(
'disabled');
86 return \ILIAS\Cron\Schedule\CronJobScheduleType::SCHEDULE_TYPE_IN_MINUTES;
91 if ($this->calendar_settings === null) {
92 return self::DEFAULT_SYNC_HOURS;
94 return $this->calendar_settings->getWebCalSyncHours();
106 $reader->
setUser($remoteCalendar->getRemoteUser());
107 $reader->setPass($remoteCalendar->getRemotePass());
110 $reader->import($remoteCalendar);
112 $this->
logger->warning(
'Remote Calendar: ' . $remoteCalendar->getCategoryID());
113 $this->
logger->warning(
'Reading remote calendar failed with message: ' . $e->getMessage());
116 $remoteCalendar->update();
121 $result->setStatus($status);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getDefaultScheduleValue()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilCalendarSettings $calendar_settings
static lookupRemoteCalendars()
final const STATUS_NO_ACTION
final const STATUS_CRASHED
addToExternalSettingsForm(int $a_form_id, array &$a_fields, bool $a_is_active)