34 include_once(
'./classes/class.ilObjectGUI.php');
 
   44         public function __construct($a_data, $a_id, $a_call_by_reference = 
true, $a_prepare_output = 
true)
 
   52                 $this->lng->loadLanguageModule(
'dateplaner');
 
   53                 $this->lng->loadLanguageModule(
'jscalendar');
 
   66                 $next_class = $this->ctrl->getNextClass($this);
 
   67                 $cmd = $this->ctrl->getCmd();
 
   71                 if(!$ilAccess->checkAccess(
'read',
'',$this->object->getRefId()))
 
   73                         $ilErr->raiseError($this->lng->txt(
'no_permission'),$ilErr->WARNING);
 
   78                         case 'ilpermissiongui':
 
   79                                 $this->tabs_gui->setTabActive(
'perm_settings');
 
   80                                 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
 
   82                                 $ret =& $this->ctrl->forwardCommand($perm_gui);
 
   86                                 $this->tabs_gui->setTabActive(
'settings');
 
  108                 global $rbacsystem, $ilAccess;
 
  110                 if ($ilAccess->checkAccess(
"read",
'',$this->object->getRefId()))
 
  112                         $this->tabs_gui->addTarget(
"settings",
 
  113                                 $this->ctrl->getLinkTarget($this, 
"settings"),
 
  114                                 array(
"settings", 
"view"));
 
  117                 if ($ilAccess->checkAccess(
'edit_permission',
'',$this->object->getRefId()))
 
  119                         $this->tabs_gui->addTarget(
"perm_settings",
 
  120                                 $this->ctrl->getLinkTargetByClass(
'ilpermissiongui',
"perm"),
 
  121                                 array(),
'ilpermissiongui');
 
  130                 include_once(
'./Services/Calendar/classes/class.ilDateTime.php');
 
  132                 include_once(
'./Services/Calendar/classes/iCal/class.ilICalParser.php');
 
  134                 include_once(
'./Services/Calendar/classes/class.ilCalendarRecurrenceCalculator.php');
 
  135                 include_once(
'./Services/Calendar/classes/class.ilCalendarRecurrence.php');
 
  136                 include_once(
'./Services/Calendar/classes/class.ilCalendarEntry.php');
 
  139                 #$parser = new ilICalParser('./extern/Feiertage.ics',ilICalParser::INPUT_FILE); 
  140                 #$parser->setCategoryId(6); 
  151                 #echo "RESULT: ".$list; 
  171                 #$parser = new ilICalParser('./extern/fc.ics',ilICalParser::INPUT_FILE); 
  172                 #$parser->setCategoryId(11); 
  173                 #$parser = new ilICalParser('./Feiertage.ics',ilICalParser::INPUT_FILE); 
  175                 #$entry = new ilCalendarEntry(927); 
  191                 $this->tabs_gui->setTabActive(
'settings');
 
  193                 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.settings.html',
'Services/Calendar');
 
  194                 $this->tpl->setVariable(
'CAL_SETTINGS',$this->form->getHTML());
 
  206                 $this->
settings->setDefaultWeekStart((
int) $_POST[
'default_week_start']);
 
  208                 $this->
settings->setDefaultDateFormat((
int) $_POST[
'default_date_format']);
 
  209                 $this->
settings->setDefaultTimeFormat((
int) $_POST[
'default_time_format']);
 
  210                 $this->
settings->setEnableGroupMilestones((
int) $_POST[
'enable_grp_milestones']);
 
  211                 $this->
settings->setDefaultDayStart((
int) $_POST[
'dst']);
 
  212                 $this->
settings->setDefaultDayEnd((
int) $_POST[
'den']);
 
  213                 $this->
settings->enableSynchronisationCache((
bool) $_POST[
'sync_cache']);
 
  214                 $this->
settings->setSynchronisationCacheMinutes((
int) $_POST[
'sync_cache_time']);
 
  215                 $this->
settings->setCacheMinutes((
int) $_POST[
'cache_time']);
 
  216                 $this->
settings->useCache((
bool) $_POST[
'cache']);      
 
  217                 $this->
settings->enableNotification((
bool) $_POST[
'cn']);
 
  218                 $this->
settings->enableConsultationHours((
bool) $_POST[
'ch']);
 
  219                 $this->
settings->enableCGRegistration((
bool) $_POST[
'cgr']);
 
  221                 if(((
int) $_POST[
'den']) < (
int) $_POST[
'dst'])
 
  241                 include_once(
'Services/Calendar/classes/class.ilCalendarSettings.php');
 
  252                 if(is_object($this->form))
 
  256                 include_once(
'Services/Calendar/classes/class.ilCalendarUtil.php');
 
  257                 include_once(
'Services/Form/classes/class.ilPropertyFormGUI.php');
 
  260                 $this->form->setFormAction($this->ctrl->getFormAction($this));
 
  261                 $this->form->setTitle($this->lng->txt(
'cal_global_settings'));
 
  262                 $this->form->addCommandButton(
'save',$this->lng->txt(
'save'));
 
  263                 #$this->form->addCommandButton('cancel',$this->lng->txt('cancel')); 
  267                 $check->setChecked($this->
settings->isEnabled() ? 
true : 
false);
 
  268                 $this->form->addItem($check);
 
  272                 $this->form->addItem($server_tz);
 
  274                 $select = 
new ilSelectInputGUI($this->lng->txt(
'cal_def_timezone'),
'default_timezone');
 
  276                 $select->setInfo($this->lng->txt(
'cal_def_timezone_info'));
 
  277                 $select->setValue($this->
settings->getDefaultTimeZone());
 
  278                 $this->form->addItem($select);
 
  281                 $select = 
new ilSelectInputGUI($this->lng->txt(
'cal_def_date_format'),
'default_date_format');
 
  286                 $select->setInfo($this->lng->txt(
'cal_def_date_format_info'));
 
  287                 $select->setValue($this->
settings->getDefaultDateFormat());
 
  288                 $this->form->addItem($select);
 
  290                 $select = 
new ilSelectInputGUI($this->lng->txt(
'cal_def_time_format'),
'default_time_format');
 
  294                 $select->setInfo($this->lng->txt(
'cal_def_time_format_info'));
 
  295                 $select->setValue($this->
settings->getDefaultTimeFormat());
 
  296                 $this->form->addItem($select);
 
  302                 $radio->addOption($option);
 
  304                 $radio->addOption($option);
 
  309                 $cache->setInfo($this->lng->txt(
'cal_cache_info'));
 
  310                 $cache->setRequired(
true);
 
  312                 $sync_cache = 
new ilRadioOption($this->lng->txt(
'cal_cache_disabled'),0);
 
  313                 $cache->addOption($sync_cache);
 
  315                 $sync_cache = 
new ilRadioOption($this->lng->txt(
'cal_cache_enabled'),1);
 
  316                 $cache->addOption($sync_cache);
 
  319                 $cache_t->setValue($this->
settings->getCacheMinutes());
 
  320                 $cache_t->setMinValue(0);
 
  321                 $cache_t->setSize(3);
 
  322                 $cache_t->setMaxLength(3);
 
  323                 $cache_t->setSuffix($this->lng->txt(
'form_minutes'));
 
  324                 $sync_cache->addSubItem($cache_t);
 
  325                 $this->form->addItem($cache);
 
  328                 $checkm = 
new ilCheckboxInputGUI($this->lng->txt(
'cal_enable_group_milestones'),
'enable_grp_milestones');
 
  330                 $checkm->setChecked($this->
settings->getEnableGroupMilestones() ? 
true : 
false);
 
  331                 $checkm->setInfo($this->lng->txt(
'cal_enable_group_milestones_desc'));
 
  332                 $this->form->addItem($checkm);
 
  334                 $this->form->addItem($radio);
 
  341                 $day_start->setValue($this->
settings->getDefaultDayStart());
 
  342                 $this->form->addItem($day_start);
 
  348                 $day_end->setValue($this->
settings->getDefaultDayEnd());
 
  349                 $this->form->addItem($day_end);
 
  353                 $con->setTitle($this->lng->txt(
'cal_ch_form_header'));
 
  354                 $this->form->addItem($con);
 
  357                 $ch->
setInfo($this->lng->txt(
'cal_ch_form_info'));
 
  359                 $ch->setChecked($this->
settings->areConsultationHoursEnabled());
 
  360                 $this->form->addItem($ch);
 
  364                 $sec->setTitle($this->lng->txt(
'cal_sync_header'));
 
  365                 $this->form->addItem($sec);
 
  369                 $cache->setInfo($this->lng->txt(
'cal_sync_cache_info'));
 
  370                 $cache->setRequired(
true);
 
  372                 $sync_cache = 
new ilRadioOption($this->lng->txt(
'cal_sync_disabled'),0);
 
  373                 $cache->addOption($sync_cache);
 
  375                 $sync_cache = 
new ilRadioOption($this->lng->txt(
'cal_sync_enabled'),1);
 
  376                 $cache->addOption($sync_cache);
 
  379                 $cache_t->setValue($this->
settings->getSynchronisationCacheMinutes());
 
  380                 $cache_t->setMinValue(0);
 
  381                 $cache_t->setSize(3);
 
  382                 $cache_t->setMaxLength(3);
 
  383                 $cache_t->setSuffix($this->lng->txt(
'form_minutes'));
 
  384                 $sync_cache->addSubItem($cache_t);
 
  386                 $this->form->addItem($cache);
 
  390                 $not->setTitle($this->lng->txt(
'notifications'));
 
  391                 $this->form->addItem($not);
 
  395                 $cgn->setChecked($this->
settings->isNotificationEnabled());
 
  396                 $cgn->setInfo($this->lng->txt(
'cal_adm_notification_info'));
 
  397                 $this->form->addItem($cgn);
 
  401                 $book->setTitle($this->lng->txt(
'cal_registrations'));
 
  402                 $this->form->addItem($book);
 
  406                 $cgn->setChecked($this->
settings->isCGRegistrationEnabled());
 
  407                 $cgn->setInfo($this->lng->txt(
'cal_cg_registration_info'));
 
  408                 $this->form->addItem($cgn);