46    public function __construct($a_data, $a_id, $a_call_by_reference = 
true, $a_prepare_output = 
true)
 
   51        parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
 
   54        $this->lng->loadLanguageModule(
'dateplaner');
 
   55        $this->lng->loadLanguageModule(
'jscalendar');
 
   68        $next_class = $this->ctrl->getNextClass($this);
 
   69        $cmd = $this->ctrl->getCmd();
 
   73        if (!$ilAccess->checkAccess(
'read', 
'', $this->object->getRefId())) {
 
   74            $ilErr->raiseError($this->lng->txt(
'no_permission'), 
$ilErr->WARNING);
 
   77        switch ($next_class) {
 
   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');
 
   88                if (!$cmd || $cmd == 
'view') {
 
  109        if ($ilAccess->checkAccess(
"read", 
'', $this->object->getRefId())) {
 
  110            $this->tabs_gui->addTarget(
 
  112                $this->ctrl->getLinkTarget($this, 
"settings"),
 
  113                array(
"settings", 
"view")
 
  117        if ($ilAccess->checkAccess(
'edit_permission', 
'', $this->object->getRefId())) {
 
  118            $this->tabs_gui->addTarget(
 
  120                $this->ctrl->getLinkTargetByClass(
'ilpermissiongui', 
"perm"),
 
  134        $this->tabs_gui->setTabActive(
'settings');
 
  136        $this->tpl->addBlockFile(
'ADM_CONTENT', 
'adm_content', 
'tpl.settings.html', 
'Services/Calendar');
 
  137        $this->tpl->setVariable(
'CAL_SETTINGS', $this->form->getHTML());
 
  151        $this->
settings->setDefaultWeekStart((
int) $_POST[
'default_week_start']);
 
  153        $this->
settings->setDefaultDateFormat((
int) $_POST[
'default_date_format']);
 
  154        $this->
settings->setDefaultTimeFormat((
int) $_POST[
'default_time_format']);
 
  155        $this->
settings->setEnableGroupMilestones((
int) $_POST[
'enable_grp_milestones']);
 
  156        $this->
settings->enableCourseCalendar((
int) $_POST[
'visible_crs']);
 
  157        $this->
settings->enableGroupCalendar((
int) $_POST[
'visible_grp']);
 
  158        $this->
settings->setDefaultDayStart((
int) $_POST[
'dst']);
 
  159        $this->
settings->setDefaultDayEnd((
int) $_POST[
'den']);
 
  160        $this->
settings->enableSynchronisationCache((
bool) $_POST[
'sync_cache']);
 
  161        $this->
settings->setSynchronisationCacheMinutes((
int) $_POST[
'sync_cache_time']);
 
  162        $this->
settings->setCacheMinutes((
int) $_POST[
'cache_time']);
 
  163        $this->
settings->useCache((
bool) $_POST[
'cache']);
 
  164        $this->
settings->enableNotification((
bool) $_POST[
'cn']);
 
  165        $this->
settings->enableUserNotification((
bool) $_POST[
'cnu']);
 
  166        $this->
settings->enableConsultationHours((
bool) $_POST[
'ch']);
 
  167        $this->
settings->enableCGRegistration((
bool) $_POST[
'cgr']);
 
  168        $this->
settings->enableWebCalSync((
bool) $_POST[
'webcal']);
 
  169        $this->
settings->setWebCalSyncHours((
int) $_POST[
'webcal_hours']);
 
  170        $this->
settings->setShowWeeks((
int) $_POST[
'show_weeks']);
 
  171        $this->
settings->enableBatchFileDownloads((
bool) $_POST[
'batch_files']);
 
  192        include_once(
'Services/Calendar/classes/class.ilCalendarSettings.php');
 
  203        if (is_object($this->form)) {
 
  208        $this->form->setFormAction($this->ctrl->getFormAction($this));
 
  209        $this->form->setTitle($this->lng->txt(
'cal_global_settings'));
 
  213            $this->form->addCommandButton(
'save', $this->lng->txt(
'save'));
 
  218        $check->setChecked($this->
settings->isEnabled() ? 
true : 
false);
 
  219        $this->form->addItem($check);
 
  223        $this->form->addItem($server_tz);
 
  225        $select = 
new ilSelectInputGUI($this->lng->txt(
'cal_def_timezone'), 
'default_timezone');
 
  227        $select->setInfo($this->lng->txt(
'cal_def_timezone_info'));
 
  228        $select->setValue($this->
settings->getDefaultTimeZone());
 
  229        $this->form->addItem($select);
 
  232        $select = 
new ilSelectInputGUI($this->lng->txt(
'cal_def_date_format'), 
'default_date_format');
 
  233        $select->setOptions(array(
 
  237        $select->setInfo($this->lng->txt(
'cal_def_date_format_info'));
 
  238        $select->setValue($this->
settings->getDefaultDateFormat());
 
  239        $this->form->addItem($select);
 
  241        $select = 
new ilSelectInputGUI($this->lng->txt(
'cal_def_time_format'), 
'default_time_format');
 
  242        $select->setOptions(array(
 
  245        $select->setInfo($this->lng->txt(
'cal_def_time_format_info'));
 
  246        $select->setValue($this->
settings->getDefaultTimeFormat());
 
  247        $this->form->addItem($select);
 
  251        $radio->setValue($this->
settings->getDefaultWeekStart());
 
  254        $radio->addOption($option);
 
  256        $radio->addOption($option);
 
  258        $this->form->addItem($radio);
 
  262        $cb->setInfo($this->lng->txt(
"cal_show_weeks_info"));
 
  264        $cb->setChecked($this->
settings->getShowWeeks());
 
  265        $this->form->addItem($cb);
 
  269        $day_start = 
new ilSelectInputGUI($this->lng->txt(
'cal_def_day_start'), 
'dst');
 
  270        $day_start->setOptions(
 
  273        $day_start->setValue($this->
settings->getDefaultDayStart());
 
  274        $this->form->addItem($day_start);
 
  277        $day_end->setOptions(
 
  280        $day_end->setValue($this->
settings->getDefaultDayEnd());
 
  281        $this->form->addItem($day_end);
 
  286        $sync->setInfo($this->lng->txt(
'cal_webcal_sync_info'));
 
  289        $sync_min->setSize(2);
 
  290        $sync_min->setMaxLength(3);
 
  291        $sync_min->setValue($this->
settings->getWebCalSyncHours());
 
  292        $sync_min->setSuffix($this->lng->txt(
'hours'));
 
  293        $sync->addSubItem($sync_min);
 
  295        $this->form->addItem(
$sync);
 
  298        $batch_files_download = 
new ilCheckboxInputGUI($this->lng->txt(
'cal_batch_file_downloads'), 
"batch_files");
 
  299        $batch_files_download->setValue(1);
 
  300        $batch_files_download->setChecked($this->
settings->isBatchFileDownloadsEnabled());
 
  301        $batch_files_download->setInfo($this->lng->txt(
'cal_batch_file_downloads_info'));
 
  302        $this->form->addItem($batch_files_download);
 
  306        $mil->setTitle($this->lng->txt(
'cal_milestone_settings'));
 
  307        $this->form->addItem($mil);
 
  309        $checkm = 
new ilCheckboxInputGUI($this->lng->txt(
'cal_enable_group_milestones'), 
'enable_grp_milestones');
 
  310        $checkm->setValue(1);
 
  311        $checkm->setChecked($this->
settings->getEnableGroupMilestones() ? 
true : 
false);
 
  312        $checkm->setInfo($this->lng->txt(
'cal_enable_group_milestones_desc'));
 
  313        $this->form->addItem($checkm);
 
  317        $con->setTitle($this->lng->txt(
'cal_ch_form_header'));
 
  318        $this->form->addItem($con);
 
  321        $ch->setInfo($this->lng->txt(
'cal_ch_form_info'));
 
  323        $ch->setChecked($this->
settings->areConsultationHoursEnabled());
 
  324        $this->form->addItem($ch);
 
  328        $rep->setTitle(
$GLOBALS[
'lng']->txt(
'cal_setting_global_vis_repos'));
 
  329        $this->form->addItem($rep);
 
  332        $crs->setInfo(
$GLOBALS[
'lng']->txt(
'cal_setting_global_crs_vis_info'));
 
  334        $crs->setInfo(
$GLOBALS[
'lng']->txt(
'cal_setting_global_crs_vis_info'));
 
  335        $crs->setChecked($this->
settings->isCourseCalendarEnabled());
 
  336        $this->form->addItem($crs);
 
  339        $grp->setInfo(
$GLOBALS[
'lng']->txt(
'cal_setting_global_grp_vis_info'));
 
  341        $grp->setInfo(
$GLOBALS[
'lng']->txt(
'cal_setting_global_grp_vis_info'));
 
  342        $grp->setChecked($this->
settings->isGroupCalendarEnabled());
 
  343        $this->form->addItem($grp);
 
  350        $not->setTitle($this->lng->txt(
'notifications'));
 
  351        $this->form->addItem($not);
 
  354        $cgn->setOptionTitle($this->lng->txt(
'cal_notification_crsgrp'));
 
  356        $cgn->setChecked($this->
settings->isNotificationEnabled());
 
  357        $cgn->setInfo($this->lng->txt(
'cal_adm_notification_info'));
 
  358        $this->form->addItem($cgn);
 
  361        $cnu->setOptionTitle($this->lng->txt(
'cal_notification_users'));
 
  363        $cnu->setChecked($this->
settings->isUserNotificationEnabled());
 
  364        $cnu->setInfo($this->lng->txt(
'cal_adm_notification_user_info'));
 
  365        $this->form->addItem($cnu);
 
  370        $book->setTitle($this->lng->txt(
'cal_registrations'));
 
  371        $this->form->addItem($book);
 
  375        $cgn->setChecked($this->
settings->isCGRegistrationEnabled());
 
  376        $cgn->setInfo($this->lng->txt(
'cal_cg_registration_info'));
 
  377        $this->form->addItem($cgn);
 
  381        $sec->setTitle($this->lng->txt(
'cal_cache_settings'));
 
  382        $this->form->addItem($sec);
 
  385        $cache->setValue((
int) $this->
settings->isSynchronisationCacheEnabled());
 
  386        $cache->setInfo($this->lng->txt(
'cal_sync_cache_info'));
 
  387        $cache->setRequired(
true);
 
  389        $sync_cache = 
new ilRadioOption($this->lng->txt(
'cal_sync_disabled'), 0);
 
  390        $cache->addOption($sync_cache);
 
  392        $sync_cache = 
new ilRadioOption($this->lng->txt(
'cal_sync_enabled'), 1);
 
  393        $cache->addOption($sync_cache);
 
  396        $cache_t->setValue($this->
settings->getSynchronisationCacheMinutes());
 
  397        $cache_t->setMinValue(0);
 
  398        $cache_t->setSize(3);
 
  399        $cache_t->setMaxLength(3);
 
  400        $cache_t->setSuffix($this->lng->txt(
'form_minutes'));
 
  401        $sync_cache->addSubItem($cache_t);
 
  403        $this->form->addItem($cache);
 
  407        $cache->setValue((
int) $this->
settings->isCacheUsed());
 
  408        $cache->setInfo($this->lng->txt(
'cal_cache_info'));
 
  409        $cache->setRequired(
true);
 
  411        $sync_cache = 
new ilRadioOption($this->lng->txt(
'cal_cache_disabled'), 0);
 
  412        $cache->addOption($sync_cache);
 
  414        $sync_cache = 
new ilRadioOption($this->lng->txt(
'cal_cache_enabled'), 1);
 
  415        $cache->addOption($sync_cache);
 
  418        $cache_t->setValue($this->
settings->getCacheMinutes());
 
  419        $cache_t->setMinValue(0);
 
  420        $cache_t->setSize(3);
 
  421        $cache_t->setMaxLength(3);
 
  422        $cache_t->setSuffix($this->lng->txt(
'form_minutes'));
 
  423        $sync_cache->addSubItem($cache_t);
 
  424        $this->form->addItem($cache);
 
  429        switch ($a_form_id) {
 
  437                $fields[
'cal_setting_global_vis_repos'] = array(
null, 
null, $subitems);
 
  443                $fields[
'cal_notification'] = array(
null, 
null, $subitems);
 
  447                return array(array(
"settings", $fields));
 
  456                $fields[
'cal_setting_global_vis_repos'] = array(
null, 
null, $subitems);
 
  462                $fields[
'cal_notification'] = array(
null, 
null, $subitems);
 
  466                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.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
prepareOutput($a_show_subobjects=true)
prepare output
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
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.