23include_once(
'./Services/Object/classes/class.ilObjectGUI.php');
 
   43        public function __construct($a_data, $a_id, $a_call_by_reference = 
true, $a_prepare_output = 
true)
 
   48                parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
 
   51                $this->lng->loadLanguageModule(
'dateplaner');
 
   52                $this->lng->loadLanguageModule(
'jscalendar');
 
   65                $next_class = $this->ctrl->getNextClass($this);
 
   66                $cmd = $this->ctrl->getCmd();
 
   70                if(!$ilAccess->checkAccess(
'read',
'',$this->object->getRefId()))
 
   72                        $ilErr->raiseError($this->lng->txt(
'no_permission'),
$ilErr->WARNING);
 
   77                        case 'ilpermissiongui':
 
   78                                $this->tabs_gui->setTabActive(
'perm_settings');
 
   79                                include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
 
   81                                $ret =& $this->ctrl->forwardCommand($perm_gui);
 
   85                                $this->tabs_gui->setTabActive(
'settings');
 
  107                global $rbacsystem, $ilAccess;
 
  109                if ($ilAccess->checkAccess(
"read",
'',$this->object->getRefId()))
 
  111                        $this->tabs_gui->addTarget(
"settings",
 
  112                                $this->ctrl->getLinkTarget($this, 
"settings"),
 
  113                                array(
"settings", 
"view"));
 
  116                if ($ilAccess->checkAccess(
'edit_permission',
'',$this->object->getRefId()))
 
  118                        $this->tabs_gui->addTarget(
"perm_settings",
 
  119                                $this->ctrl->getLinkTargetByClass(
'ilpermissiongui',
"perm"),
 
  120                                array(),
'ilpermissiongui');
 
  129                include_once(
'./Services/Calendar/classes/class.ilDateTime.php');
 
  131                include_once(
'./Services/Calendar/classes/iCal/class.ilICalParser.php');
 
  133                include_once(
'./Services/Calendar/classes/class.ilCalendarRecurrenceCalculator.php');
 
  134                include_once(
'./Services/Calendar/classes/class.ilCalendarRecurrence.php');
 
  135                include_once(
'./Services/Calendar/classes/class.ilCalendarEntry.php');
 
  138                #$parser = new ilICalParser('./extern/Feiertage.ics',ilICalParser::INPUT_FILE); 
  139                #$parser->setCategoryId(6); 
  150                #echo "RESULT: ".$list;
 
  170                #$parser = new ilICalParser('./extern/fc.ics',ilICalParser::INPUT_FILE); 
  171                #$parser->setCategoryId(11); 
  172                #$parser = new ilICalParser('./Feiertage.ics',ilICalParser::INPUT_FILE); 
  174                #$entry = new ilCalendarEntry(927); 
  190                $this->tabs_gui->setTabActive(
'settings');
 
  192                $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.settings.html',
'Services/Calendar');
 
  193                $this->tpl->setVariable(
'CAL_SETTINGS',$this->form->getHTML());
 
  205                $this->
settings->setDefaultWeekStart((
int) $_POST[
'default_week_start']);
 
  207                $this->
settings->setDefaultDateFormat((
int) $_POST[
'default_date_format']);
 
  208                $this->
settings->setDefaultTimeFormat((
int) $_POST[
'default_time_format']);
 
  209                $this->
settings->setEnableGroupMilestones((
int) $_POST[
'enable_grp_milestones']);
 
  210                $this->
settings->enableCourseCalendar((
int) $_POST[
'visible_crs']);
 
  211                $this->
settings->enableGroupCalendar((
int) $_POST[
'visible_grp']);
 
  212                $this->
settings->setDefaultDayStart((
int) $_POST[
'dst']);
 
  213                $this->
settings->setDefaultDayEnd((
int) $_POST[
'den']);
 
  214                $this->
settings->enableSynchronisationCache((
bool) $_POST[
'sync_cache']);
 
  215                $this->
settings->setSynchronisationCacheMinutes((
int) $_POST[
'sync_cache_time']);
 
  216                $this->
settings->setCacheMinutes((
int) $_POST[
'cache_time']);
 
  217                $this->
settings->useCache((
bool) $_POST[
'cache']);      
 
  218                $this->
settings->enableNotification((
bool) $_POST[
'cn']);
 
  219                $this->
settings->enableUserNotification((
bool) $_POST[
'cnu']);
 
  220                $this->
settings->enableConsultationHours((
bool) $_POST[
'ch']);
 
  221                $this->
settings->enableCGRegistration((
bool) $_POST[
'cgr']);
 
  222                $this->
settings->enableWebCalSync((
bool) $_POST[
'webcal']);
 
  223                $this->
settings->setWebCalSyncHours((
int) $_POST[
'webcal_hours']);
 
  245                include_once(
'Services/Calendar/classes/class.ilCalendarSettings.php');
 
  256                if(is_object($this->form))
 
  260                include_once(
'Services/Calendar/classes/class.ilCalendarUtil.php');
 
  261                include_once(
'Services/Form/classes/class.ilPropertyFormGUI.php');
 
  264                $this->form->setFormAction($this->ctrl->getFormAction($this));
 
  265                $this->form->setTitle($this->lng->txt(
'cal_global_settings'));
 
  266                $this->form->addCommandButton(
'save',$this->lng->txt(
'save'));
 
  267                #$this->form->addCommandButton('cancel',$this->lng->txt('cancel')); 
  271                $check->setChecked($this->
settings->isEnabled() ? 
true : 
false);
 
  272                $this->form->addItem($check);
 
  276                $this->form->addItem($server_tz);
 
  278                $select = 
new ilSelectInputGUI($this->lng->txt(
'cal_def_timezone'),
'default_timezone');
 
  280                $select->setInfo($this->lng->txt(
'cal_def_timezone_info'));
 
  281                $select->setValue($this->
settings->getDefaultTimeZone());
 
  282                $this->form->addItem($select);
 
  285                $select = 
new ilSelectInputGUI($this->lng->txt(
'cal_def_date_format'),
'default_date_format');
 
  286                $select->setOptions(array(
 
  290                $select->setInfo($this->lng->txt(
'cal_def_date_format_info'));
 
  291                $select->setValue($this->
settings->getDefaultDateFormat());
 
  292                $this->form->addItem($select);
 
  294                $select = 
new ilSelectInputGUI($this->lng->txt(
'cal_def_time_format'),
'default_time_format');
 
  295                $select->setOptions(array(
 
  298                $select->setInfo($this->lng->txt(
'cal_def_time_format_info'));
 
  299                $select->setValue($this->
settings->getDefaultTimeFormat());
 
  300                $this->form->addItem($select);
 
  304                $radio->setValue($this->
settings->getDefaultWeekStart());
 
  307                $radio->addOption($option);
 
  309                $radio->addOption($option);
 
  311                $this->form->addItem($radio);
 
  315                $day_start->setOptions(
 
  318                $day_start->setValue($this->
settings->getDefaultDayStart());
 
  319                $this->form->addItem($day_start);
 
  322                $day_end->setOptions(
 
  325                $day_end->setValue($this->
settings->getDefaultDayEnd());
 
  326                $this->form->addItem($day_end);
 
  330                $sync->setChecked($this->
settings->isWebCalSyncEnabled());
 
  331                $sync->setInfo($this->lng->txt(
'cal_webcal_sync_info'));
 
  334                $sync_min->setSize(2);
 
  335                $sync_min->setMaxLength(3);
 
  336                $sync_min->setValue($this->
settings->getWebCalSyncHours());
 
  337                $sync_min->setSuffix($this->lng->txt(
'hours'));
 
  338                $sync->addSubItem($sync_min);
 
  340                $this->form->addItem($sync);
 
  346                $mil->setTitle($this->lng->txt(
'cal_milestone_settings'));
 
  347                $this->form->addItem($mil);
 
  349                $checkm = 
new ilCheckboxInputGUI($this->lng->txt(
'cal_enable_group_milestones'),
'enable_grp_milestones');
 
  350                $checkm->setValue(1);
 
  351                $checkm->setChecked($this->
settings->getEnableGroupMilestones() ? 
true : 
false);
 
  352                $checkm->setInfo($this->lng->txt(
'cal_enable_group_milestones_desc'));
 
  353                $this->form->addItem($checkm);
 
  357                $con->setTitle($this->lng->txt(
'cal_ch_form_header'));
 
  358                $this->form->addItem($con);
 
  361                $ch->setInfo($this->lng->txt(
'cal_ch_form_info'));
 
  363                $ch->setChecked($this->
settings->areConsultationHoursEnabled());
 
  364                $this->form->addItem($ch);
 
  368                $rep->setTitle(
$GLOBALS[
'lng']->txt(
'cal_setting_global_vis_repos'));
 
  369                $this->form->addItem($rep);
 
  372                $crs->setInfo(
$GLOBALS[
'lng']->txt(
'cal_setting_global_crs_vis_info'));
 
  374                $crs->setInfo(
$GLOBALS[
'lng']->txt(
'cal_setting_global_crs_vis_info'));
 
  375                $crs->setChecked($this->
settings->isCourseCalendarEnabled());
 
  376                $this->form->addItem($crs);
 
  379                $grp->setInfo(
$GLOBALS[
'lng']->txt(
'cal_setting_global_grp_vis_info'));
 
  381                $grp->setInfo(
$GLOBALS[
'lng']->txt(
'cal_setting_global_grp_vis_info'));
 
  382                $grp->setChecked($this->
settings->isGroupCalendarEnabled());
 
  383                $this->form->addItem($grp);
 
  390                $not->setTitle($this->lng->txt(
'notifications'));
 
  391                $this->form->addItem($not);
 
  394                $cgn->setOptionTitle($this->lng->txt(
'cal_notification_crsgrp'));
 
  396                $cgn->setChecked($this->
settings->isNotificationEnabled());
 
  397                $cgn->setInfo($this->lng->txt(
'cal_adm_notification_info'));
 
  398                $this->form->addItem($cgn);
 
  401                $cnu->setOptionTitle($this->lng->txt(
'cal_notification_users'));
 
  403                $cnu->setChecked($this->
settings->isUserNotificationEnabled());
 
  404                $cnu->setInfo($this->lng->txt(
'cal_adm_notification_user_info'));
 
  405                $this->form->addItem($cnu);
 
  410                $book->setTitle($this->lng->txt(
'cal_registrations'));
 
  411                $this->form->addItem($book);
 
  415                $cgn->setChecked($this->
settings->isCGRegistrationEnabled());
 
  416                $cgn->setInfo($this->lng->txt(
'cal_cg_registration_info'));
 
  417                $this->form->addItem($cgn);
 
  421                $sec->setTitle($this->lng->txt(
'cal_cache_settings'));
 
  422                $this->form->addItem($sec);
 
  425                $cache->setValue((
int) $this->
settings->isSynchronisationCacheEnabled());
 
  426                $cache->setInfo($this->lng->txt(
'cal_sync_cache_info'));
 
  427                $cache->setRequired(
true);
 
  429                $sync_cache = 
new ilRadioOption($this->lng->txt(
'cal_sync_disabled'),0);
 
  430                $cache->addOption($sync_cache);
 
  432                $sync_cache = 
new ilRadioOption($this->lng->txt(
'cal_sync_enabled'),1);
 
  433                $cache->addOption($sync_cache);
 
  436                $cache_t->setValue($this->
settings->getSynchronisationCacheMinutes());
 
  437                $cache_t->setMinValue(0);
 
  438                $cache_t->setSize(3);
 
  439                $cache_t->setMaxLength(3);
 
  440                $cache_t->setSuffix($this->lng->txt(
'form_minutes'));
 
  441                $sync_cache->addSubItem($cache_t);
 
  443                $this->form->addItem($cache);
 
  447                $cache->setValue((
int) $this->
settings->isCacheUsed());
 
  448                $cache->setInfo($this->lng->txt(
'cal_cache_info'));
 
  449                $cache->setRequired(
true);
 
  451                $sync_cache = 
new ilRadioOption($this->lng->txt(
'cal_cache_disabled'),0);
 
  452                $cache->addOption($sync_cache);
 
  454                $sync_cache = 
new ilRadioOption($this->lng->txt(
'cal_cache_enabled'),1);
 
  455                $cache->addOption($sync_cache);
 
  458                $cache_t->setValue($this->
settings->getCacheMinutes());
 
  459                $cache_t->setMinValue(0);
 
  460                $cache_t->setSize(3);
 
  461                $cache_t->setMaxLength(3);
 
  462                $cache_t->setSuffix($this->lng->txt(
'form_minutes'));
 
  463                $sync_cache->addSubItem($cache_t);
 
  464                $this->form->addItem($cache);
 
  478                                $fields[
'cal_setting_global_vis_repos'] = array(
null, 
null, $subitems);
 
  484                                $fields[
'cal_notification'] = array(
null, 
null, $subitems);
 
  488                                return array(array(
"settings", $fields));       
 
  497                                $fields[
'cal_setting_global_vis_repos'] = array(
null, 
null, $subitems);
 
  503                                $fields[
'cal_notification'] = array(
null, 
null, $subitems);
 
  507                                return array(array(
"settings", $fields));       
 
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
An exception for terminatinating execution or to throw for unit testing.
static _getInstance()
get singleton instance
static _getShortTimeZoneList()
get short timezone list
static getHourSelection($a_format)
Get hour selectio depending on user specific hour format.
This class represents a non editable value in a property form.
initFormSettings()
Init settings property form.
initCalendarSettings()
init calendar settings
addToExternalSettingsForm($a_form_id)
executeCommand()
Execute command.
__construct($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
Constructor.
Class ilObjectGUI Basic methods of all Output classes.
prepareOutput($a_show_subobjects=true)
prepare output
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
This class represents an option in a radio group.
static _getDefaultTimeZone()
Calculate and set default time zone.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
$GLOBALS['loaded']
Global hash that tracks already loaded includes.