ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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
 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...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 getAdminTabs ()
 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 ()
 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...
 
 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...
 
 editObject ()
 edit object More...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 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...
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html. 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
 getObjectService ()
 Get object service. More...
 
 assignObject ()
 
 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...
 
 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...
 
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput()) 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, $a_catch_errors=true)
 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...
 
 getTabs ()
 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 (ilColumnGUI $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...
 

Protected Attributes

 $settings
 
- Protected Attributes inherited from ilObjectGUI
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 

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
 
 $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 46 of file class.ilObjCalendarSettingsGUI.php.

References $DIC, and ilObjectGUI\$lng.

47  {
48  global $DIC;
49 
50  $lng = $DIC['lng'];
51 
52  $this->type = 'cals';
53  parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
54 
55  $this->lng = $lng;
56  $this->lng->loadLanguageModule('dateplaner');
57  $this->lng->loadLanguageModule('jscalendar');
58  }
global $DIC
Definition: saml.php:7

Member Function Documentation

◆ addToExternalSettingsForm()

ilObjCalendarSettingsGUI::addToExternalSettingsForm (   $a_form_id)

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

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

436  {
437  switch ($a_form_id) {
439 
440  $this->initCalendarSettings();
441 
442  $fields = array();
443 
444  $subitems = array('cal_setting_global_crs_vis' => array($this->settings->isCourseCalendarEnabled(), ilAdministrationSettingsFormHandler::VALUE_BOOL));
445  $fields['cal_setting_global_vis_repos'] = array(null, null, $subitems);
446 
447  $subitems = array(
448  'cal_notification_crsgrp' => array($this->settings->isNotificationEnabled(), ilAdministrationSettingsFormHandler::VALUE_BOOL),
449  'cal_notification_users' => array($this->settings->isUserNotificationEnabled(), ilAdministrationSettingsFormHandler::VALUE_BOOL)
450  );
451  $fields['cal_notification'] = array(null, null, $subitems);
452 
453  $fields['cal_cg_registrations'] = array($this->settings->isCGRegistrationEnabled(), ilAdministrationSettingsFormHandler::VALUE_BOOL);
454 
455  return array(array("settings", $fields));
456 
458 
459  $this->initCalendarSettings();
460 
461  $fields = array();
462 
463  $subitems = array('cal_setting_global_grp_vis' => array($this->settings->isGroupCalendarEnabled(), ilAdministrationSettingsFormHandler::VALUE_BOOL));
464  $fields['cal_setting_global_vis_repos'] = array(null, null, $subitems);
465 
466  $subitems = array(
467  'cal_notification_crsgrp' => array($this->settings->isNotificationEnabled(), ilAdministrationSettingsFormHandler::VALUE_BOOL),
468  'cal_notification_users' => array($this->settings->isUserNotificationEnabled(), ilAdministrationSettingsFormHandler::VALUE_BOOL)
469  );
470  $fields['cal_notification'] = array(null, null, $subitems);
471 
472  $fields['cal_cg_registrations'] = array($this->settings->isCGRegistrationEnabled(), ilAdministrationSettingsFormHandler::VALUE_BOOL);
473 
474  return array(array("settings", $fields));
475  }
476  }
initCalendarSettings()
init calendar settings
+ Here is the call graph for this function:

◆ executeCommand()

ilObjCalendarSettingsGUI::executeCommand ( )

Execute command.

public

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

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

67  {
68  global $DIC;
69 
70  $ilErr = $DIC['ilErr'];
71  $ilAccess = $DIC['ilAccess'];
72 
73  $next_class = $this->ctrl->getNextClass($this);
74  $cmd = $this->ctrl->getCmd();
75 
76  $this->prepareOutput();
77 
78  if (!$ilAccess->checkAccess('read', '', $this->object->getRefId())) {
79  $ilErr->raiseError($this->lng->txt('no_permission'), $ilErr->WARNING);
80  }
81 
82  switch ($next_class) {
83  case 'ilpermissiongui':
84  $this->tabs_gui->setTabActive('perm_settings');
85  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
86  $perm_gui = new ilPermissionGUI($this);
87  $ret = &$this->ctrl->forwardCommand($perm_gui);
88  break;
89 
90  default:
91  $this->tabs_gui->setTabActive('settings');
92  $this->initCalendarSettings();
93  if (!$cmd || $cmd == 'view') {
94  $cmd = "settings";
95  }
96 
97  $this->$cmd();
98  break;
99  }
100  return true;
101  }
global $DIC
Definition: saml.php:7
prepareOutput($a_show_subobjects=true)
prepare output
$ret
Definition: parser.php:6
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 110 of file class.ilObjCalendarSettingsGUI.php.

References $DIC.

111  {
112  global $DIC;
113 
114  $rbacsystem = $DIC['rbacsystem'];
115  $ilAccess = $DIC['ilAccess'];
116 
117  if ($ilAccess->checkAccess("read", '', $this->object->getRefId())) {
118  $this->tabs_gui->addTarget(
119  "settings",
120  $this->ctrl->getLinkTarget($this, "settings"),
121  array("settings", "view")
122  );
123  }
124 
125  if ($ilAccess->checkAccess('edit_permission', '', $this->object->getRefId())) {
126  $this->tabs_gui->addTarget(
127  "perm_settings",
128  $this->ctrl->getLinkTargetByClass('ilpermissiongui', "perm"),
129  array(),
130  'ilpermissiongui'
131  );
132  }
133  }
global $DIC
Definition: saml.php:7

◆ initCalendarSettings()

ilObjCalendarSettingsGUI::initCalendarSettings ( )
protected

init calendar settings

protected

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

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

Referenced by addToExternalSettingsForm(), and executeCommand().

199  {
200  include_once('Services/Calendar/classes/class.ilCalendarSettings.php');
202  }
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 209 of file class.ilObjCalendarSettingsGUI.php.

References $GLOBALS, $sync, ilTimeZone\_getDefaultTimeZone(), ilCalendarUtil\_getShortTimeZoneList(), ilObjectGUI\checkPermissionBool(), 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().

210  {
211  if (is_object($this->form)) {
212  return true;
213  }
214 
215  $this->form = new ilPropertyFormGUI();
216  $this->form->setFormAction($this->ctrl->getFormAction($this));
217  $this->form->setTitle($this->lng->txt('cal_global_settings'));
218 
219 
220  if ($this->checkPermissionBool('write')) {
221  $this->form->addCommandButton('save', $this->lng->txt('save'));
222  }
223 
224  $check = new ilCheckboxInputGUI($this->lng->txt('enable_calendar'), 'enable');
225  $check->setValue(1);
226  $check->setChecked($this->settings->isEnabled() ? true : false);
227  $this->form->addItem($check);
228 
229  $server_tz = new ilNonEditableValueGUI($this->lng->txt('cal_server_tz'));
231  $this->form->addItem($server_tz);
232 
233  $select = new ilSelectInputGUI($this->lng->txt('cal_def_timezone'), 'default_timezone');
235  $select->setInfo($this->lng->txt('cal_def_timezone_info'));
236  $select->setValue($this->settings->getDefaultTimeZone());
237  $this->form->addItem($select);
238 
239  $year = date("Y");
240  $select = new ilSelectInputGUI($this->lng->txt('cal_def_date_format'), 'default_date_format');
241  $select->setOptions(array(
242  ilCalendarSettings::DATE_FORMAT_DMY => '31.10.' . $year,
243  ilCalendarSettings::DATE_FORMAT_YMD => $year . "-10-31",
244  ilCalendarSettings::DATE_FORMAT_MDY => "10/31/" . $year));
245  $select->setInfo($this->lng->txt('cal_def_date_format_info'));
246  $select->setValue($this->settings->getDefaultDateFormat());
247  $this->form->addItem($select);
248 
249  $select = new ilSelectInputGUI($this->lng->txt('cal_def_time_format'), 'default_time_format');
250  $select->setOptions(array(
253  $select->setInfo($this->lng->txt('cal_def_time_format_info'));
254  $select->setValue($this->settings->getDefaultTimeFormat());
255  $this->form->addItem($select);
256 
257  // Weekstart
258  $radio = new ilRadioGroupInputGUI($this->lng->txt('cal_def_week_start'), 'default_week_start');
259  $radio->setValue($this->settings->getDefaultWeekStart());
260 
261  $option = new ilRadioOption($this->lng->txt('l_su'), 0);
262  $radio->addOption($option);
263  $option = new ilRadioOption($this->lng->txt('l_mo'), 1);
264  $radio->addOption($option);
265 
266  $this->form->addItem($radio);
267 
268  // show weeks
269  $cb = new ilCheckboxInputGUI($this->lng->txt("cal_def_show_weeks"), "show_weeks");
270  $cb->setInfo($this->lng->txt("cal_show_weeks_info"));
271  $cb->setValue(1);
272  $cb->setChecked($this->settings->getShowWeeks());
273  $this->form->addItem($cb);
274 
275 
276  // Day start
277  $day_start = new ilSelectInputGUI($this->lng->txt('cal_def_day_start'), 'dst');
278  $day_start->setOptions(
279  ilCalendarUtil::getHourSelection($this->settings->getDefaultTimeFormat())
280  );
281  $day_start->setValue($this->settings->getDefaultDayStart());
282  $this->form->addItem($day_start);
283 
284  $day_end = new ilSelectInputGUI($this->lng->txt('cal_def_day_end'), 'den');
285  $day_end->setOptions(
286  ilCalendarUtil::getHourSelection($this->settings->getDefaultTimeFormat())
287  );
288  $day_end->setValue($this->settings->getDefaultDayEnd());
289  $this->form->addItem($day_end);
290 
291  $sync = new ilCheckboxInputGUI($this->lng->txt('cal_webcal_sync'), 'webcal');
292  $sync->setValue(1);
293  $sync->setChecked($this->settings->isWebCalSyncEnabled());
294  $sync->setInfo($this->lng->txt('cal_webcal_sync_info'));
295 
296  $sync_min = new ilNumberInputGUI('', 'webcal_hours');
297  $sync_min->setSize(2);
298  $sync_min->setMaxLength(3);
299  $sync_min->setValue($this->settings->getWebCalSyncHours());
300  $sync_min->setSuffix($this->lng->txt('hours'));
301  $sync->addSubItem($sync_min);
302 
303  $this->form->addItem($sync);
304 
305  //Batch File Downloads in Calendar
306  $batch_files_download = new ilCheckboxInputGUI($this->lng->txt('cal_batch_file_downloads'), "batch_files");
307  $batch_files_download->setValue(1);
308  $batch_files_download->setChecked($this->settings->isBatchFileDownloadsEnabled());
309  $batch_files_download->setInfo($this->lng->txt('cal_batch_file_downloads_info'));
310  $this->form->addItem($batch_files_download);
311 
312  // enable milestone planning in groups
313  $mil = new ilFormSectionHeaderGUI();
314  $mil->setTitle($this->lng->txt('cal_milestone_settings'));
315  $this->form->addItem($mil);
316 
317  $checkm = new ilCheckboxInputGUI($this->lng->txt('cal_enable_group_milestones'), 'enable_grp_milestones');
318  $checkm->setValue(1);
319  $checkm->setChecked($this->settings->getEnableGroupMilestones() ? true : false);
320  $checkm->setInfo($this->lng->txt('cal_enable_group_milestones_desc'));
321  $this->form->addItem($checkm);
322 
323  // Consultation hours
324  $con = new ilFormSectionHeaderGUI();
325  $con->setTitle($this->lng->txt('cal_ch_form_header'));
326  $this->form->addItem($con);
327 
328  $ch = new ilCheckboxInputGUI($this->lng->txt('cal_ch_form'), 'ch');
329  $ch->setInfo($this->lng->txt('cal_ch_form_info'));
330  $ch->setValue(1);
331  $ch->setChecked($this->settings->areConsultationHoursEnabled());
332  $this->form->addItem($ch);
333 
334  // repository visibility default
335  $rep = new ilFormSectionHeaderGUI();
336  $rep->setTitle($GLOBALS['DIC']['lng']->txt('cal_setting_global_vis_repos'));
337  $this->form->addItem($rep);
338 
339  $crs = new ilCheckboxInputGUI($GLOBALS['DIC']['lng']->txt('cal_setting_global_crs_vis'), 'visible_crs');
340  $crs->setInfo($GLOBALS['DIC']['lng']->txt('cal_setting_global_crs_vis_info'));
341  $crs->setValue(1);
342  $crs->setInfo($GLOBALS['DIC']['lng']->txt('cal_setting_global_crs_vis_info'));
343  $crs->setChecked($this->settings->isCourseCalendarEnabled());
344  $this->form->addItem($crs);
345 
346  $grp = new ilCheckboxInputGUI($GLOBALS['DIC']['lng']->txt('cal_setting_global_grp_vis'), 'visible_grp');
347  $grp->setInfo($GLOBALS['DIC']['lng']->txt('cal_setting_global_grp_vis_info'));
348  $grp->setValue(1);
349  $grp->setInfo($GLOBALS['DIC']['lng']->txt('cal_setting_global_grp_vis_info'));
350  $grp->setChecked($this->settings->isGroupCalendarEnabled());
351  $this->form->addItem($grp);
352 
353 
354 
355 
356  // Notifications
357  $not = new ilFormSectionHeaderGUI();
358  $not->setTitle($this->lng->txt('notifications'));
359  $this->form->addItem($not);
360 
361  $cgn = new ilCheckboxInputGUI($this->lng->txt('cal_notification'), 'cn');
362  $cgn->setOptionTitle($this->lng->txt('cal_notification_crsgrp'));
363  $cgn->setValue(1);
364  $cgn->setChecked($this->settings->isNotificationEnabled());
365  $cgn->setInfo($this->lng->txt('cal_adm_notification_info'));
366  $this->form->addItem($cgn);
367 
368  $cnu = new ilCheckboxInputGUI('', 'cnu');
369  $cnu->setOptionTitle($this->lng->txt('cal_notification_users'));
370  $cnu->setValue(1);
371  $cnu->setChecked($this->settings->isUserNotificationEnabled());
372  $cnu->setInfo($this->lng->txt('cal_adm_notification_user_info'));
373  $this->form->addItem($cnu);
374 
375 
376  // Registration
377  $book = new ilFormSectionHeaderGUI();
378  $book->setTitle($this->lng->txt('cal_registrations'));
379  $this->form->addItem($book);
380 
381  $cgn = new ilCheckboxInputGUI($this->lng->txt('cal_cg_registrations'), 'cgr');
382  $cgn->setValue(1);
383  $cgn->setChecked($this->settings->isCGRegistrationEnabled());
384  $cgn->setInfo($this->lng->txt('cal_cg_registration_info'));
385  $this->form->addItem($cgn);
386 
387  // Synchronisation cache
388  $sec = new ilFormSectionHeaderGUI();
389  $sec->setTitle($this->lng->txt('cal_cache_settings'));
390  $this->form->addItem($sec);
391 
392  $cache = new ilRadioGroupInputGUI($this->lng->txt('cal_sync_cache'), 'sync_cache');
393  $cache->setValue((int) $this->settings->isSynchronisationCacheEnabled());
394  $cache->setInfo($this->lng->txt('cal_sync_cache_info'));
395  $cache->setRequired(true);
396 
397  $sync_cache = new ilRadioOption($this->lng->txt('cal_sync_disabled'), 0);
398  $cache->addOption($sync_cache);
399 
400  $sync_cache = new ilRadioOption($this->lng->txt('cal_sync_enabled'), 1);
401  $cache->addOption($sync_cache);
402 
403  $cache_t = new ilNumberInputGUI('', 'sync_cache_time');
404  $cache_t->setValue($this->settings->getSynchronisationCacheMinutes());
405  $cache_t->setMinValue(0);
406  $cache_t->setSize(3);
407  $cache_t->setMaxLength(3);
408  $cache_t->setSuffix($this->lng->txt('form_minutes'));
409  $sync_cache->addSubItem($cache_t);
410 
411  $this->form->addItem($cache);
412 
413  // Calendar cache
414  $cache = new ilRadioGroupInputGUI($this->lng->txt('cal_cache'), 'cache');
415  $cache->setValue((int) $this->settings->isCacheUsed());
416  $cache->setInfo($this->lng->txt('cal_cache_info'));
417  $cache->setRequired(true);
418 
419  $sync_cache = new ilRadioOption($this->lng->txt('cal_cache_disabled'), 0);
420  $cache->addOption($sync_cache);
421 
422  $sync_cache = new ilRadioOption($this->lng->txt('cal_cache_enabled'), 1);
423  $cache->addOption($sync_cache);
424 
425  $cache_t = new ilNumberInputGUI('', 'cache_time');
426  $cache_t->setValue($this->settings->getCacheMinutes());
427  $cache_t->setMinValue(0);
428  $cache_t->setSize(3);
429  $cache_t->setMaxLength(3);
430  $cache_t->setSuffix($this->lng->txt('form_minutes'));
431  $sync_cache->addSubItem($cache_t);
432  $this->form->addItem($cache);
433  }
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.
This class represents a number property in a property form.
setValue($a_value)
Set Value.
$sync
setOptions($a_options)
Set Options.
This class represents a non editable value in a property form.
setOptionTitle($a_optiontitle)
Set Option Title (optional).
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
+ 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 154 of file class.ilObjCalendarSettingsGUI.php.

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

155  {
156  $this->checkPermission('write');
157 
158  $this->settings->setEnabled((int) $_POST['enable']);
159  $this->settings->setDefaultWeekStart((int) $_POST['default_week_start']);
160  $this->settings->setDefaultTimeZone(ilUtil::stripSlashes($_POST['default_timezone']));
161  $this->settings->setDefaultDateFormat((int) $_POST['default_date_format']);
162  $this->settings->setDefaultTimeFormat((int) $_POST['default_time_format']);
163  $this->settings->setEnableGroupMilestones((int) $_POST['enable_grp_milestones']);
164  $this->settings->enableCourseCalendar((int) $_POST['visible_crs']);
165  $this->settings->enableGroupCalendar((int) $_POST['visible_grp']);
166  $this->settings->setDefaultDayStart((int) $_POST['dst']);
167  $this->settings->setDefaultDayEnd((int) $_POST['den']);
168  $this->settings->enableSynchronisationCache((bool) $_POST['sync_cache']);
169  $this->settings->setSynchronisationCacheMinutes((int) $_POST['sync_cache_time']);
170  $this->settings->setCacheMinutes((int) $_POST['cache_time']);
171  $this->settings->useCache((bool) $_POST['cache']);
172  $this->settings->enableNotification((bool) $_POST['cn']);
173  $this->settings->enableUserNotification((bool) $_POST['cnu']);
174  $this->settings->enableConsultationHours((bool) $_POST['ch']);
175  $this->settings->enableCGRegistration((bool) $_POST['cgr']);
176  $this->settings->enableWebCalSync((bool) $_POST['webcal']);
177  $this->settings->setWebCalSyncHours((int) $_POST['webcal_hours']);
178  $this->settings->setShowWeeks((int) $_POST['show_weeks']);
179  $this->settings->enableBatchFileDownloads((bool) $_POST['batch_files']);
180 
181  if (((int) $_POST['den']) < (int) $_POST['dst']) {
182  ilUtil::sendFailure($this->lng->txt('cal_dstart_dend_warn'));
183  $this->settings();
184  return false;
185  }
186 
187  $this->settings->save();
188 
189  ilUtil::sendSuccess($this->lng->txt('settings_saved'));
190  $this->settings();
191  }
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.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
$_POST["username"]
+ Here is the call graph for this function:

◆ settings()

ilObjCalendarSettingsGUI::settings ( )

Edit settings.

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

References ilObjectGUI\checkPermission(), and initFormSettings().

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

139  {
140  $this->checkPermission('read');
141 
142  $this->tabs_gui->setTabActive('settings');
143  $this->initFormSettings();
144  $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.settings.html', 'Services/Calendar');
145  $this->tpl->setVariable('CAL_SETTINGS', $this->form->getHTML());
146  return true;
147  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
initFormSettings()
Init settings property form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $settings

ilObjCalendarSettingsGUI::$settings
protected

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


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