24 include_once(
'Services/Calendar/classes/class.ilTimeZone.php');
116 if (self::$instance) {
117 return self::$instance;
133 $gl_activated =
false;
147 include_once
'./Services/Container/classes/class.ilContainer.php';
150 'cont_show_calendar',
162 $this->cache_enabled = $a_status;
181 $this->cache_minutes = $a_min;
201 $this->enabled = $a_enabled;
223 $this->week_start = $a_start;
266 $this->date_format = $a_format;
277 return $this->date_format;
289 $this->time_format = $a_format;
319 $this->day_start = $a_start;
338 $this->day_end = $a_end;
356 $this->consultation_hours = $a_status;
379 $this->enablegroupmilestones = $a_enablegroupmilestones;
389 return $this->enablegroupmilestones;
407 $this->sync_cache_enabled = $a_status;
417 $this->sync_cache_minutes = $a_min;
455 $this->notification_user = $a_not;
465 $this->cg_registration = $a_status;
475 $this->course_cal_enabled = $a_stat;
485 $this->group_cal_enabled = $a_stat;
495 $this->webcal_sync = $a_stat;
505 $this->webcal_sync_hours = $a_hours;
520 $this->show_weeks = $a_val;
535 $this->batch_file_downloads = $a_stat;
550 $this->storage->set(
'enabled', (
int) $this->
isEnabled());
561 $this->storage->set(
'cache_enabled', (
int) $this->
isCacheUsed());
570 $this->storage->set(
'show_weeks', (
int) $this->
getShowWeeks());
583 $this->
setEnabled($this->storage->get(
'enabled'));
585 $this->
setDefaultWeekStart($this->storage->get(
'default_week_start', self::WEEK_START_MONDAY));
589 $this->
setDefaultDayStart($this->storage->get(
'default_day_start', self::DEFAULT_DAY_START));
590 $this->
setDefaultDayEnd($this->storage->get(
'default_day_end', self::DEFAULT_DAY_END));
592 $this->
setCacheMinutes($this->storage->get(
'cache_minutes', self::DEFAULT_CACHE_MINUTES));
595 $this->
enableNotification($this->storage->get(
'notification', $this->isNotificationEnabled()));
596 $this->
enableConsultationHours($this->storage->get(
'consultation_hours', $this->areConsultationHoursEnabled()));
597 $this->
enableCGRegistration($this->storage->get(
'cg_registration', $this->isCGRegistrationEnabled()));
598 $this->
enableCourseCalendar($this->storage->get(
'course_cal', $this->isCourseCalendarEnabled()));
599 $this->
enableGroupCalendar($this->storage->get(
'group_cal', $this->isGroupCalendarEnabled()));
600 $this->
enableUserNotification($this->storage->get(
'notification_user', $this->isUserNotificationEnabled()));
601 $this->
enableWebCalSync($this->storage->get(
'webcal_sync', $this->isWebCalSyncEnabled()));
602 $this->
setWebCalSyncHours($this->storage->get(
'webcal_sync_hours', $this->getWebCalSyncHours()));
603 $this->
setShowWeeks($this->storage->get(
'show_weeks', $this->getShowWeeks()));
616 $query =
"SELECT ref_id FROM object_reference obr " .
617 "JOIN object_data obd ON obd.obj_id = obr.obj_id " .
618 "WHERE type = 'cals'";
620 $set = $this->db->query(
$query);
621 $row = $this->db->fetchAssoc($set);
623 $this->cal_settings_id =
$row[
"ref_id"];
634 include_once(
'./Services/Administration/classes/class.ilSetting.php');
635 $this->storage =
new ilSetting(
'calendar');
getDefaultTimeFormat()
get default time format
static _getDefaultTimeZone()
Calculate and set default time zone.
getCacheMinutes()
Get cache minutes.
getDefaultTimeZone()
get derfault time zone
setSynchronisationCacheMinutes($a_min)
Set synchronisation cache minutes.
static _getInstance()
get singleton instance
getDefaultWeekStart()
get default week start
enableConsultationHours($a_status)
En/Disable consultation hours.
isNotificationEnabled()
Course group notification enabled.
enableWebCalSync($a_stat)
isCacheUsed()
Check if cache is used.
setShowWeeks($a_val)
Set show weeks.
setWebCalSyncHours($a_hours)
setDefaultDayStart($a_start)
Set default start of day.
getShowWeeks()
Get show weeks.
setDefaultDateFormat($a_format)
set default date format
setEnableGroupMilestones($a_enablegroupmilestones)
Set Enable milestone planning feature for groups.
isBatchFileDownloadsEnabled()
static lookupCalendarActivated($a_obj_id)
getDefaultDateFormat()
get default date format
isUserNotificationEnabled()
setDefaultDayEnd($a_end)
set default end of day
setDefaultTimeFormat($a_format)
set default time format
getCalendarSettingsId()
Get calendar settings id (Used for permission checks)
const DEFAULT_SYNC_CACHE_MINUTES
getDefaultDayStart()
Get default end of day.
getSynchronisationCacheMinutes()
get synchronisation cache minutes
getDefaultDayEnd()
Get default end of day.
setCacheMinutes($a_min)
Set time of cache storage.
isCGRegistrationEnabled()
areConsultationHoursEnabled()
Check if consultation hours are enabled.
setDefaultTimeZone($a_zone)
set default timezone
enableUserNotification($a_not)
enableBatchFileDownloads($a_stat)
setEnabled($a_enabled)
set enabled
enableGroupCalendar($a_stat)
static _lookupType($a_id, $a_reference=false)
lookup object type
Stores all calendar relevant settings.
enableSynchronisationCache($a_status)
En/Disable synchronisation cache.
isEnabled()
is calendar enabled
getEnableGroupMilestones()
Get Enable milestone planning feature for groups.
enableCourseCalendar($a_stat)
isCourseCalendarEnabled()
enableNotification($a_status)
Enable course group notification.
readCalendarSettingsId()
Read ref_id of calendar settings.
__construct()
singleton contructor
useCache($a_status)
Enable cache.
enableCGRegistration($a_status)
Enable optional registration for courses and groups.
isSynchronisationCacheEnabled()
Check if cache is active for calendar synchronisation.
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=null)
Lookup a container setting.
initStorage()
Init storage class (ilSetting) private.
const DEFAULT_CACHE_MINUTES
setDefaultWeekStart($a_start)
set week start