19declare(strict_types=1);
34 $this->
lng = $DIC->language();
35 $this->
logger = $DIC->logger()->cal();
41 return 'cal_remote_reader';
46 $this->
lng->loadLanguageModule(
'dateplaner');
47 return $this->
lng->txt(
'cal_cronjob_remote_title');
52 $this->
lng->loadLanguageModule(
'dateplaner');
53 return $this->
lng->txt(
'cal_cronjob_remote_description');
70 $a_fields[
'cal_webcal_sync'] = $a_is_active ?
71 $this->
lng->txt(
'enabled') :
72 $this->
lng->txt(
'disabled');
89 if ($this->calendar_settings ===
null) {
92 return $this->calendar_settings->getWebCalSyncHours();
104 $reader->setUser($remoteCalendar->getRemoteUser());
105 $reader->setPass($remoteCalendar->getRemotePass());
108 $reader->import($remoteCalendar);
109 }
catch (Exception
$e) {
110 $this->
logger->warning(
'Remote Calendar: ' . $remoteCalendar->getCategoryID());
111 $this->
logger->warning(
'Reading remote calendar failed with message: ' . $e->getMessage());
114 $remoteCalendar->update();
119 $result->setStatus($status);
static lookupRemoteCalendars()
getDefaultScheduleValue()
addToExternalSettingsForm(int $a_form_id, array &$a_fields, bool $a_is_active)
ilCalendarSettings $calendar_settings
hasAutoActivation()
Is to be activated on "installation", does only work for ILIAS core cron jobs.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Stores all calendar relevant settings.
const SCHEDULE_TYPE_IN_HOURS
@depracated This will be replaced with an ENUM in ILIAS 9
@classDescription Date and time handling
Component logger with individual log levels by component id.