24 include_once(
'Services/Calendar/classes/class.ilTimeZone.php');
114 return self::$instance;
131 $gl_activated =
false;
146 include_once
'./Services/Container/classes/class.ilContainer.php';
149 'cont_show_calendar',
161 $this->cache_enabled = $a_status;
180 $this->cache_minutes = $a_min;
200 $this->enabled = $a_enabled;
222 $this->week_start = $a_start;
265 $this->date_format = $a_format;
276 return $this->date_format;
288 $this->time_format = $a_format;
318 $this->day_start = $a_start;
337 $this->day_end = $a_end;
355 $this->consultation_hours = $a_status;
378 $this->enablegroupmilestones = $a_enablegroupmilestones;
388 return $this->enablegroupmilestones;
406 $this->sync_cache_enabled = $a_status;
416 $this->sync_cache_minutes = $a_min;
454 $this->notification_user = $a_not;
464 $this->cg_registration = $a_status;
474 $this->course_cal_enabled = $a_stat;
484 $this->group_cal_enabled = $a_stat;
494 $this->webcal_sync = $a_stat;
504 $this->webcal_sync_hours = $a_hours;
519 $this->storage->set(
'enabled',(
int) $this->
isEnabled());
530 $this->storage->set(
'cache_enabled',(
int) $this->
isCacheUsed());
550 $this->
setEnabled($this->storage->get(
'enabled'));
552 $this->
setDefaultWeekStart($this->storage->get(
'default_week_start',self::WEEK_START_MONDAY));
556 $this->
setDefaultDayStart($this->storage->get(
'default_day_start',self::DEFAULT_DAY_START));
557 $this->
setDefaultDayEnd($this->storage->get(
'default_day_end',self::DEFAULT_DAY_END));
559 $this->
setCacheMinutes($this->storage->get(
'cache_minutes',self::DEFAULT_CACHE_MINUTES));
562 $this->
enableNotification($this->storage->get(
'notification',$this->isNotificationEnabled()));
563 $this->
enableConsultationHours($this->storage->get(
'consultation_hours',$this->areConsultationHoursEnabled()));
564 $this->
enableCGRegistration($this->storage->get(
'cg_registration',$this->isCGRegistrationEnabled()));
565 $this->
enableCourseCalendar($this->storage->get(
'course_cal',$this->isCourseCalendarEnabled()));
566 $this->
enableGroupCalendar($this->storage->get(
'group_cal',$this->isGroupCalendarEnabled()));
567 $this->
enableUserNotification($this->storage->get(
'notification_user',$this->isUserNotificationEnabled()));
568 $this->
enableWebCalSync($this->storage->get(
'webcal_sync',$this->isWebCalSyncEnabled()));
569 $this->
setWebCalSyncHours($this->storage->get(
'webcal_sync_hours',$this->getWebCalSyncHours()));
581 $query =
"SELECT ref_id FROM object_reference obr ".
582 "JOIN object_data obd ON obd.obj_id = obr.obj_id ".
583 "WHERE type = 'cals'";
585 $set = $this->db->query(
$query);
586 $row = $this->db->fetchAssoc($set);
588 $this->cal_settings_id =
$row[
"ref_id"];
599 include_once(
'./Services/Administration/classes/class.ilSetting.php');
600 $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.
setWebCalSyncHours($a_hours)
setDefaultDayStart($a_start)
Set default start of day.
setDefaultDateFormat($a_format)
set default date format
setEnableGroupMilestones($a_enablegroupmilestones)
Set Enable milestone planning feature for groups.
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)
setEnabled($a_enabled)
set enabled
enableGroupCalendar($a_stat)
static _lookupType($a_id, $a_reference=false)
lookup object type
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=NULL)
Lookup a container setting.
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.
initStorage()
Init storage class (ilSetting) private.
const DEFAULT_CACHE_MINUTES
setDefaultWeekStart($a_start)
set week start