ILIAS  release_4-4 Revision
ilObjCalendarSettingsGUI Class Reference
+ Inheritance diagram for ilObjCalendarSettingsGUI:
+ Collaboration diagram for ilObjCalendarSettingsGUI:

Public Member Functions

 __construct ($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor. More...
 
 executeCommand ()
 Execute command. More...
 
 getAdminTabs ()
 Get tabs. More...
 
 settings ()
 Edit settings. More...
 
 addToExternalSettingsForm ($a_form_id)
 
- Public Member Functions inherited from ilObjectGUI
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public. More...
 
executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 getAdminTabs (&$tabs_gui)
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ($in_rep=false)
 cancel action and go back to previous page public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 editObject ()
 edit object More...
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 list childs of current object More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 

Protected Member Functions

 save ()
 save settings More...
 
 initCalendarSettings ()
 init calendar settings More...
 
 initFormSettings ()
 Init settings property form. More...
 
- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 
 prepareOutput ()
 prepare output More...
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 showMountWebfolderIcon ()
 
 setTabs ()
 set admin tabs public More...
 
 setAdminTabs ()
 set admin tabs public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste More...
 
 getTabs (&$tabs_gui)
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 redirectToRefId ($a_ref_id, $a_cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings ($column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root. More...
 
- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $ilias
 
 $objDefinition
 
 $tpl
 
 $tree
 
 $lng
 
 $data
 
 $object
 
 $ref_id
 
 $obj_id
 
 $maxcount
 
 $formaction
 
 $return_location
 
 $target_frame
 
 $tab_target_script
 
 $actions
 
 $sub_objects
 
 $omit_locator = false
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjCalendarSettingsGUI::__construct (   $a_data,
  $a_id,
  $a_call_by_reference = true,
  $a_prepare_output = true 
)

Constructor.

public

Definition at line 43 of file class.ilObjCalendarSettingsGUI.php.

References ilObjectGUI\$lng.

44  {
45  global $lng;
46 
47  $this->type = 'cals';
48  parent::ilObjectGUI($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
49 
50  $this->lng = $lng;
51  $this->lng->loadLanguageModule('dateplaner');
52  $this->lng->loadLanguageModule('jscalendar');
53  }

Member Function Documentation

◆ addToExternalSettingsForm()

ilObjCalendarSettingsGUI::addToExternalSettingsForm (   $a_form_id)

Definition at line 467 of file class.ilObjCalendarSettingsGUI.php.

References ilAdministrationSettingsFormHandler\FORM_COURSE, ilAdministrationSettingsFormHandler\FORM_GROUP, initCalendarSettings(), settings(), and ilAdministrationSettingsFormHandler\VALUE_BOOL.

468  {
469  switch($a_form_id)
470  {
472 
473  $this->initCalendarSettings();
474 
475  $fields = array();
476 
477  $subitems = array('cal_setting_global_crs_vis' => array($this->settings->isCourseCalendarEnabled(), ilAdministrationSettingsFormHandler::VALUE_BOOL));
478  $fields['cal_setting_global_vis_repos'] = array(null, null, $subitems);
479 
480  $subitems = array(
481  'cal_notification_crsgrp' => array($this->settings->isNotificationEnabled(), ilAdministrationSettingsFormHandler::VALUE_BOOL),
482  'cal_notification_users' => array($this->settings->isUserNotificationEnabled(), ilAdministrationSettingsFormHandler::VALUE_BOOL)
483  );
484  $fields['cal_notification'] = array(null, null, $subitems);
485 
486  $fields['cal_cg_registrations'] = array($this->settings->isCGRegistrationEnabled(), ilAdministrationSettingsFormHandler::VALUE_BOOL);
487 
488  return array(array("settings", $fields));
489 
491 
492  $this->initCalendarSettings();
493 
494  $fields = array();
495 
496  $subitems = array('cal_setting_global_grp_vis' => array($this->settings->isGroupCalendarEnabled(), ilAdministrationSettingsFormHandler::VALUE_BOOL));
497  $fields['cal_setting_global_vis_repos'] = array(null, null, $subitems);
498 
499  $subitems = array(
500  'cal_notification_crsgrp' => array($this->settings->isNotificationEnabled(), ilAdministrationSettingsFormHandler::VALUE_BOOL),
501  'cal_notification_users' => array($this->settings->isUserNotificationEnabled(), ilAdministrationSettingsFormHandler::VALUE_BOOL)
502  );
503  $fields['cal_notification'] = array(null, null, $subitems);
504 
505  $fields['cal_cg_registrations'] = array($this->settings->isCGRegistrationEnabled(), ilAdministrationSettingsFormHandler::VALUE_BOOL);
506 
507  return array(array("settings", $fields));
508  }
509  }
initCalendarSettings()
init calendar settings
+ Here is the call graph for this function:

◆ executeCommand()

ilObjCalendarSettingsGUI::executeCommand ( )

Execute command.

public

Definition at line 61 of file class.ilObjCalendarSettingsGUI.php.

References $cmd, $ilErr, $ret, initCalendarSettings(), and ilObjectGUI\prepareOutput().

62  {
63  global $ilErr,$ilAccess;
64 
65  $next_class = $this->ctrl->getNextClass($this);
66  $cmd = $this->ctrl->getCmd();
67 
68  $this->prepareOutput();
69 
70  if(!$ilAccess->checkAccess('read','',$this->object->getRefId()))
71  {
72  $ilErr->raiseError($this->lng->txt('no_permission'),$ilErr->WARNING);
73  }
74 
75  switch($next_class)
76  {
77  case 'ilpermissiongui':
78  $this->tabs_gui->setTabActive('perm_settings');
79  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
80  $perm_gui =& new ilPermissionGUI($this);
81  $ret =& $this->ctrl->forwardCommand($perm_gui);
82  break;
83 
84  default:
85  $this->tabs_gui->setTabActive('settings');
86  $this->initCalendarSettings();
87  if(!$cmd || $cmd == 'view')
88  {
89  $cmd = "settings";
90  }
91 
92  $this->$cmd();
93  break;
94  }
95  return true;
96  }
$cmd
Definition: sahs_server.php:35
prepareOutput()
prepare output
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
initCalendarSettings()
init calendar settings
+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjCalendarSettingsGUI::getAdminTabs ( )

Get tabs.

public

Definition at line 105 of file class.ilObjCalendarSettingsGUI.php.

106  {
107  global $rbacsystem, $ilAccess;
108 
109  if ($ilAccess->checkAccess("read",'',$this->object->getRefId()))
110  {
111  $this->tabs_gui->addTarget("settings",
112  $this->ctrl->getLinkTarget($this, "settings"),
113  array("settings", "view"));
114  }
115 
116  if ($ilAccess->checkAccess('edit_permission','',$this->object->getRefId()))
117  {
118  $this->tabs_gui->addTarget("perm_settings",
119  $this->ctrl->getLinkTargetByClass('ilpermissiongui',"perm"),
120  array(),'ilpermissiongui');
121  }
122  }

◆ initCalendarSettings()

ilObjCalendarSettingsGUI::initCalendarSettings ( )
protected

init calendar settings

protected

Definition at line 243 of file class.ilObjCalendarSettingsGUI.php.

References ilCalendarSettings\_getInstance(), and settings().

Referenced by addToExternalSettingsForm(), and executeCommand().

244  {
245  include_once('Services/Calendar/classes/class.ilCalendarSettings.php');
247  }
static _getInstance()
get singleton instance
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initFormSettings()

ilObjCalendarSettingsGUI::initFormSettings ( )
protected

Init settings property form.

protected

Definition at line 254 of file class.ilObjCalendarSettingsGUI.php.

References $GLOBALS, ilTimeZone\_getDefaultTimeZone(), ilCalendarUtil\_getShortTimeZoneList(), ilCalendarSettings\DATE_FORMAT_DMY, ilCalendarSettings\DATE_FORMAT_MDY, ilCalendarSettings\DATE_FORMAT_YMD, ilCalendarUtil\getHourSelection(), ilFormPropertyGUI\setInfo(), ilSelectInputGUI\setOptions(), ilCheckboxInputGUI\setOptionTitle(), settings(), ilCheckboxInputGUI\setValue(), ilRadioGroupInputGUI\setValue(), ilNonEditableValueGUI\setValue(), ilCalendarSettings\TIME_FORMAT_12, and ilCalendarSettings\TIME_FORMAT_24.

Referenced by settings().

255  {
256  if(is_object($this->form))
257  {
258  return true;
259  }
260  include_once('Services/Calendar/classes/class.ilCalendarUtil.php');
261  include_once('Services/Form/classes/class.ilPropertyFormGUI.php');
262 
263  $this->form = new ilPropertyFormGUI();
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'));
268 
269  $check = new ilCheckboxInputGUI($this->lng->txt('enable_calendar'),'enable');
270  $check->setValue(1);
271  $check->setChecked($this->settings->isEnabled() ? true : false);
272  $this->form->addItem($check);
273 
274  $server_tz = new ilNonEditableValueGUI($this->lng->txt('cal_server_tz'));
276  $this->form->addItem($server_tz);
277 
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);
283 
284  $year = date("Y");
285  $select = new ilSelectInputGUI($this->lng->txt('cal_def_date_format'),'default_date_format');
286  $select->setOptions(array(
287  ilCalendarSettings::DATE_FORMAT_DMY => '31.10.'.$year,
288  ilCalendarSettings::DATE_FORMAT_YMD => $year."-10-31",
289  ilCalendarSettings::DATE_FORMAT_MDY => "10/31/".$year));
290  $select->setInfo($this->lng->txt('cal_def_date_format_info'));
291  $select->setValue($this->settings->getDefaultDateFormat());
292  $this->form->addItem($select);
293 
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);
301 
302  // Weekstart
303  $radio = new ilRadioGroupInputGUI($this->lng->txt('cal_def_week_start'),'default_week_start');
304  $radio->setValue($this->settings->getDefaultWeekStart());
305 
306  $option = new ilRadioOption($this->lng->txt('l_su'),0);
307  $radio->addOption($option);
308  $option = new ilRadioOption($this->lng->txt('l_mo'),1);
309  $radio->addOption($option);
310 
311  $this->form->addItem($radio);
312 
313  // Day start
314  $day_start = new ilSelectInputGUI($this->lng->txt('cal_day_start'),'dst');
315  $day_start->setOptions(
316  ilCalendarUtil::getHourSelection($this->settings->getDefaultTimeFormat())
317  );
318  $day_start->setValue($this->settings->getDefaultDayStart());
319  $this->form->addItem($day_start);
320 
321  $day_end = new ilSelectInputGUI($this->lng->txt('cal_day_end'),'den');
322  $day_end->setOptions(
323  ilCalendarUtil::getHourSelection($this->settings->getDefaultTimeFormat())
324  );
325  $day_end->setValue($this->settings->getDefaultDayEnd());
326  $this->form->addItem($day_end);
327 
328  $sync = new ilCheckboxInputGUI($this->lng->txt('cal_webcal_sync'),'webcal');
329  $sync->setValue(1);
330  $sync->setChecked($this->settings->isWebCalSyncEnabled());
331  $sync->setInfo($this->lng->txt('cal_webcal_sync_info'));
332 
333  $sync_min = new ilNumberInputGUI('','webcal_hours');
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);
339 
340  $this->form->addItem($sync);
341 
342 
343 
344  // enable milestone planning in groups
345  $mil = new ilFormSectionHeaderGUI();
346  $mil->setTitle($this->lng->txt('cal_milestone_settings'));
347  $this->form->addItem($mil);
348 
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);
354 
355  // Consultation hours
356  $con = new ilFormSectionHeaderGUI();
357  $con->setTitle($this->lng->txt('cal_ch_form_header'));
358  $this->form->addItem($con);
359 
360  $ch = new ilCheckboxInputGUI($this->lng->txt('cal_ch_form'),'ch');
361  $ch->setInfo($this->lng->txt('cal_ch_form_info'));
362  $ch->setValue(1);
363  $ch->setChecked($this->settings->areConsultationHoursEnabled());
364  $this->form->addItem($ch);
365 
366  // repository visibility default
367  $rep = new ilFormSectionHeaderGUI();
368  $rep->setTitle($GLOBALS['lng']->txt('cal_setting_global_vis_repos'));
369  $this->form->addItem($rep);
370 
371  $crs = new ilCheckboxInputGUI($GLOBALS['lng']->txt('cal_setting_global_crs_vis'),'visible_crs');
372  $crs->setInfo($GLOBALS['lng']->txt('cal_setting_global_crs_vis_info'));
373  $crs->setValue(1);
374  $crs->setInfo($GLOBALS['lng']->txt('cal_setting_global_crs_vis_info'));
375  $crs->setChecked($this->settings->isCourseCalendarEnabled());
376  $this->form->addItem($crs);
377 
378  $grp = new ilCheckboxInputGUI($GLOBALS['lng']->txt('cal_setting_global_grp_vis'),'visible_grp');
379  $grp->setInfo($GLOBALS['lng']->txt('cal_setting_global_grp_vis_info'));
380  $grp->setValue(1);
381  $grp->setInfo($GLOBALS['lng']->txt('cal_setting_global_grp_vis_info'));
382  $grp->setChecked($this->settings->isGroupCalendarEnabled());
383  $this->form->addItem($grp);
384 
385 
386 
387 
388  // Notifications
389  $not = new ilFormSectionHeaderGUI();
390  $not->setTitle($this->lng->txt('notifications'));
391  $this->form->addItem($not);
392 
393  $cgn = new ilCheckboxInputGUI($this->lng->txt('cal_notification'),'cn');
394  $cgn->setOptionTitle($this->lng->txt('cal_notification_crsgrp'));
395  $cgn->setValue(1);
396  $cgn->setChecked($this->settings->isNotificationEnabled());
397  $cgn->setInfo($this->lng->txt('cal_adm_notification_info'));
398  $this->form->addItem($cgn);
399 
400  $cnu = new ilCheckboxInputGUI('','cnu');
401  $cnu->setOptionTitle($this->lng->txt('cal_notification_users'));
402  $cnu->setValue(1);
403  $cnu->setChecked($this->settings->isUserNotificationEnabled());
404  $cnu->setInfo($this->lng->txt('cal_adm_notification_user_info'));
405  $this->form->addItem($cnu);
406 
407 
408  // Registration
409  $book = new ilFormSectionHeaderGUI();
410  $book->setTitle($this->lng->txt('cal_registrations'));
411  $this->form->addItem($book);
412 
413  $cgn = new ilCheckboxInputGUI($this->lng->txt('cal_cg_registrations'),'cgr');
414  $cgn->setValue(1);
415  $cgn->setChecked($this->settings->isCGRegistrationEnabled());
416  $cgn->setInfo($this->lng->txt('cal_cg_registration_info'));
417  $this->form->addItem($cgn);
418 
419  // Synchronisation cache
420  $sec = new ilFormSectionHeaderGUI();
421  $sec->setTitle($this->lng->txt('cal_cache_settings'));
422  $this->form->addItem($sec);
423 
424  $cache = new ilRadioGroupInputGUI($this->lng->txt('cal_sync_cache'),'sync_cache');
425  $cache->setValue((int) $this->settings->isSynchronisationCacheEnabled());
426  $cache->setInfo($this->lng->txt('cal_sync_cache_info'));
427  $cache->setRequired(true);
428 
429  $sync_cache = new ilRadioOption($this->lng->txt('cal_sync_disabled'),0);
430  $cache->addOption($sync_cache);
431 
432  $sync_cache = new ilRadioOption($this->lng->txt('cal_sync_enabled'),1);
433  $cache->addOption($sync_cache);
434 
435  $cache_t = new ilNumberInputGUI('','sync_cache_time');
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);
442 
443  $this->form->addItem($cache);
444 
445  // Calendar cache
446  $cache = new ilRadioGroupInputGUI($this->lng->txt('cal_cache'),'cache');
447  $cache->setValue((int) $this->settings->isCacheUsed());
448  $cache->setInfo($this->lng->txt('cal_cache_info'));
449  $cache->setRequired(true);
450 
451  $sync_cache = new ilRadioOption($this->lng->txt('cal_cache_disabled'),0);
452  $cache->addOption($sync_cache);
453 
454  $sync_cache = new ilRadioOption($this->lng->txt('cal_cache_enabled'),1);
455  $cache->addOption($sync_cache);
456 
457  $cache_t = new ilNumberInputGUI('','cache_time');
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);
465  }
static _getDefaultTimeZone()
Calculate and set default time zone.
This class represents an option in a radio group.
This class represents a selection list property in a property form.
This class represents a property form user interface.
static getHourSelection($a_format)
Get hour selectio depending on user specific hour format.
This class represents a section header in a property form.
This class represents a checkbox property in a property form.
static _getShortTimeZoneList()
get short timezone list
setInfo($a_info)
Set Information Text.
This class represents a property in a property form.
$GLOBALS['ct_recipient']
This class represents a number property in a property form.
setValue($a_value)
Set Value.
setOptions($a_options)
Set Options.
This class represents a non editable value in a property form.
setOptionTitle($a_optiontitle)
Set Option Title (optional).
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ save()

ilObjCalendarSettingsGUI::save ( )
protected

save settings

protected

Definition at line 202 of file class.ilObjCalendarSettingsGUI.php.

References $_POST, ilUtil\sendFailure(), ilUtil\sendSuccess(), settings(), and ilUtil\stripSlashes().

203  {
204  $this->settings->setEnabled((int) $_POST['enable']);
205  $this->settings->setDefaultWeekStart((int) $_POST['default_week_start']);
206  $this->settings->setDefaultTimeZone(ilUtil::stripSlashes($_POST['default_timezone']));
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']);
224 
225  if(((int) $_POST['den']) < (int) $_POST['dst'])
226  {
227  ilUtil::sendFailure($this->lng->txt('cal_dstart_dend_warn'));
228  $this->settings();
229  return false;
230  }
231 
232  $this->settings->save();
233 
234  ilUtil::sendSuccess($this->lng->txt('settings_saved'));
235  $this->settings();
236  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:

◆ settings()

ilObjCalendarSettingsGUI::settings ( )

Edit settings.

Definition at line 127 of file class.ilObjCalendarSettingsGUI.php.

References initFormSettings().

Referenced by addToExternalSettingsForm(), initCalendarSettings(), initFormSettings(), and save().

128  {
129  include_once('./Services/Calendar/classes/class.ilDateTime.php');
130 
131  include_once('./Services/Calendar/classes/iCal/class.ilICalParser.php');
132 
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');
136 
137 
138  #$parser = new ilICalParser('./extern/Feiertage.ics',ilICalParser::INPUT_FILE);
139  #$parser->setCategoryId(6);
140  #$parser->parse();
141  /*
142  $calc = new ilCalendarRecurrenceCalculator(
143  new ilCalendarEntry(273),
144  new ilCalendarRecurrence(43));
145 
146  $list = $calc->calculateDateList(
147  new ilDateTime('2008-04-01',IL_CAL_DATE),
148  new ilDateTime('2008-04-31',IL_CAL_DATE));
149  */
150  #echo "RESULT: ".$list;
151  /*
152  $zeit = microtime(true);
153 
154  for($i = 0;$i < 1;$i++)
155  {
156  $calc = new ilCalendarRecurrenceCalculator(
157  new ilCalendarEntry(1061),
158  new ilCalendarRecurrence(72));
159 
160  $list = $calc->calculateDateList(
161  new ilDateTime('2008-03-01',IL_CAL_DATE),
162  new ilDateTime('2008-03-31',IL_CAL_DATE));
163  }
164  echo "NEEDS: ".(microtime(true) - $zeit).' seconds.<br>';
165  foreach($list->get() as $event)
166  {
167  echo $event->get(IL_CAL_DATETIME,'',$this->settings->getDefaultTimeZone()).'<br />';
168  }
169  */
170  #$parser = new ilICalParser('./extern/fc.ics',ilICalParser::INPUT_FILE);
171  #$parser->setCategoryId(11);
172  #$parser = new ilICalParser('./Feiertage.ics',ilICalParser::INPUT_FILE);
173  #$parser->parse();
174  #$entry = new ilCalendarEntry(927);
175  /*
176  $timezone = "US/Alaska";
177  echo $entry->getTitle().'<br>';
178  echo $entry->getStart()->get(IL_CAL_DATE,'',$timezone).'<br>';
179  echo $entry->getStart()->get(IL_CAL_DATETIME,'',$timezone).'<br>';
180  echo $entry->getEnd()->get(IL_CAL_DATE,'',$timezone).'<br>';
181  echo $entry->getEnd()->get(IL_CAL_DATETIME,'',$timezone).'<br>';
182 
183  $entry = new ilCalendarEntry(928);
184  echo $entry->getTitle().'<br>';
185  echo $entry->getStart()->get(IL_CAL_DATE,'',$timezone).'<br>';
186  echo $entry->getStart()->get(IL_CAL_DATETIME,'',$timezone).'<br>';
187  echo $entry->getEnd()->get(IL_CAL_DATE,'',$timezone).'<br>';
188  echo $entry->getEnd()->get(IL_CAL_DATETIME,'',$timezone).'<br>';
189  */
190  $this->tabs_gui->setTabActive('settings');
191  $this->initFormSettings();
192  $this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.settings.html','Services/Calendar');
193  $this->tpl->setVariable('CAL_SETTINGS',$this->form->getHTML());
194  return true;
195  }
initFormSettings()
Init settings property form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: