ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 @access 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...
 

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 ()
 
 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 @access public More...
 
 setAdminTabs ()
 set admin tabs @access 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
 
 $rbacsystem
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 

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

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

@ilCtrl_Calls ilObjCalendarSettingsGUI: ilPermissionGUI

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

Constructor & Destructor Documentation

◆ __construct()

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

Constructor.

@access public

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

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

References ilObjectGUI\$lng.

Member Function Documentation

◆ addToExternalSettingsForm()

ilObjCalendarSettingsGUI::addToExternalSettingsForm (   $a_form_id)

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

428 {
429 switch ($a_form_id) {
431
432 $this->initCalendarSettings();
433
434 $fields = array();
435
436 $subitems = array('cal_setting_global_crs_vis' => array($this->settings->isCourseCalendarEnabled(), ilAdministrationSettingsFormHandler::VALUE_BOOL));
437 $fields['cal_setting_global_vis_repos'] = array(null, null, $subitems);
438
439 $subitems = array(
440 'cal_notification_crsgrp' => array($this->settings->isNotificationEnabled(), ilAdministrationSettingsFormHandler::VALUE_BOOL),
441 'cal_notification_users' => array($this->settings->isUserNotificationEnabled(), ilAdministrationSettingsFormHandler::VALUE_BOOL)
442 );
443 $fields['cal_notification'] = array(null, null, $subitems);
444
445 $fields['cal_cg_registrations'] = array($this->settings->isCGRegistrationEnabled(), ilAdministrationSettingsFormHandler::VALUE_BOOL);
446
447 return array(array("settings", $fields));
448
450
451 $this->initCalendarSettings();
452
453 $fields = array();
454
455 $subitems = array('cal_setting_global_grp_vis' => array($this->settings->isGroupCalendarEnabled(), ilAdministrationSettingsFormHandler::VALUE_BOOL));
456 $fields['cal_setting_global_vis_repos'] = array(null, null, $subitems);
457
458 $subitems = array(
459 'cal_notification_crsgrp' => array($this->settings->isNotificationEnabled(), ilAdministrationSettingsFormHandler::VALUE_BOOL),
460 'cal_notification_users' => array($this->settings->isUserNotificationEnabled(), ilAdministrationSettingsFormHandler::VALUE_BOOL)
461 );
462 $fields['cal_notification'] = array(null, null, $subitems);
463
464 $fields['cal_cg_registrations'] = array($this->settings->isCGRegistrationEnabled(), ilAdministrationSettingsFormHandler::VALUE_BOOL);
465
466 return array(array("settings", $fields));
467 }
468 }
initCalendarSettings()
init calendar settings

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

+ Here is the call graph for this function:

◆ executeCommand()

ilObjCalendarSettingsGUI::executeCommand ( )

Execute command.

@access public

Reimplemented from ilObjectGUI.

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

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

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

+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjCalendarSettingsGUI::getAdminTabs ( )

Get tabs.

@access public

Reimplemented from ilObjectGUI.

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

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

References ilObjectGUI\$rbacsystem.

◆ initCalendarSettings()

ilObjCalendarSettingsGUI::initCalendarSettings ( )
protected

init calendar settings

@access protected

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

191 {
192 include_once('Services/Calendar/classes/class.ilCalendarSettings.php');
194 }
static _getInstance()
get singleton instance

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

Referenced by addToExternalSettingsForm(), and executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initFormSettings()

ilObjCalendarSettingsGUI::initFormSettings ( )
protected

Init settings property form.

@access protected

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

202 {
203 if (is_object($this->form)) {
204 return true;
205 }
206
207 $this->form = new ilPropertyFormGUI();
208 $this->form->setFormAction($this->ctrl->getFormAction($this));
209 $this->form->setTitle($this->lng->txt('cal_global_settings'));
210
211
212 if ($this->checkPermissionBool('write')) {
213 $this->form->addCommandButton('save', $this->lng->txt('save'));
214 }
215
216 $check = new ilCheckboxInputGUI($this->lng->txt('enable_calendar'), 'enable');
217 $check->setValue(1);
218 $check->setChecked($this->settings->isEnabled() ? true : false);
219 $this->form->addItem($check);
220
221 $server_tz = new ilNonEditableValueGUI($this->lng->txt('cal_server_tz'));
222 $server_tz->setValue(ilTimeZone::_getDefaultTimeZone());
223 $this->form->addItem($server_tz);
224
225 $select = new ilSelectInputGUI($this->lng->txt('cal_def_timezone'), 'default_timezone');
226 $select->setOptions(ilCalendarUtil::_getShortTimeZoneList());
227 $select->setInfo($this->lng->txt('cal_def_timezone_info'));
228 $select->setValue($this->settings->getDefaultTimeZone());
229 $this->form->addItem($select);
230
231 $year = date("Y");
232 $select = new ilSelectInputGUI($this->lng->txt('cal_def_date_format'), 'default_date_format');
233 $select->setOptions(array(
234 ilCalendarSettings::DATE_FORMAT_DMY => '31.10.' . $year,
235 ilCalendarSettings::DATE_FORMAT_YMD => $year . "-10-31",
236 ilCalendarSettings::DATE_FORMAT_MDY => "10/31/" . $year));
237 $select->setInfo($this->lng->txt('cal_def_date_format_info'));
238 $select->setValue($this->settings->getDefaultDateFormat());
239 $this->form->addItem($select);
240
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);
248
249 // Weekstart
250 $radio = new ilRadioGroupInputGUI($this->lng->txt('cal_def_week_start'), 'default_week_start');
251 $radio->setValue($this->settings->getDefaultWeekStart());
252
253 $option = new ilRadioOption($this->lng->txt('l_su'), 0);
254 $radio->addOption($option);
255 $option = new ilRadioOption($this->lng->txt('l_mo'), 1);
256 $radio->addOption($option);
257
258 $this->form->addItem($radio);
259
260 // show weeks
261 $cb = new ilCheckboxInputGUI($this->lng->txt("cal_def_show_weeks"), "show_weeks");
262 $cb->setInfo($this->lng->txt("cal_show_weeks_info"));
263 $cb->setValue(1);
264 $cb->setChecked($this->settings->getShowWeeks());
265 $this->form->addItem($cb);
266
267
268 // Day start
269 $day_start = new ilSelectInputGUI($this->lng->txt('cal_def_day_start'), 'dst');
270 $day_start->setOptions(
271 ilCalendarUtil::getHourSelection($this->settings->getDefaultTimeFormat())
272 );
273 $day_start->setValue($this->settings->getDefaultDayStart());
274 $this->form->addItem($day_start);
275
276 $day_end = new ilSelectInputGUI($this->lng->txt('cal_def_day_end'), 'den');
277 $day_end->setOptions(
278 ilCalendarUtil::getHourSelection($this->settings->getDefaultTimeFormat())
279 );
280 $day_end->setValue($this->settings->getDefaultDayEnd());
281 $this->form->addItem($day_end);
282
283 $sync = new ilCheckboxInputGUI($this->lng->txt('cal_webcal_sync'), 'webcal');
284 $sync->setValue(1);
285 $sync->setChecked($this->settings->isWebCalSyncEnabled());
286 $sync->setInfo($this->lng->txt('cal_webcal_sync_info'));
287
288 $sync_min = new ilNumberInputGUI('', 'webcal_hours');
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);
294
295 $this->form->addItem($sync);
296
297 //Batch File Downloads in Calendar
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);
303
304 // enable milestone planning in groups
305 $mil = new ilFormSectionHeaderGUI();
306 $mil->setTitle($this->lng->txt('cal_milestone_settings'));
307 $this->form->addItem($mil);
308
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);
314
315 // Consultation hours
316 $con = new ilFormSectionHeaderGUI();
317 $con->setTitle($this->lng->txt('cal_ch_form_header'));
318 $this->form->addItem($con);
319
320 $ch = new ilCheckboxInputGUI($this->lng->txt('cal_ch_form'), 'ch');
321 $ch->setInfo($this->lng->txt('cal_ch_form_info'));
322 $ch->setValue(1);
323 $ch->setChecked($this->settings->areConsultationHoursEnabled());
324 $this->form->addItem($ch);
325
326 // repository visibility default
327 $rep = new ilFormSectionHeaderGUI();
328 $rep->setTitle($GLOBALS['lng']->txt('cal_setting_global_vis_repos'));
329 $this->form->addItem($rep);
330
331 $crs = new ilCheckboxInputGUI($GLOBALS['lng']->txt('cal_setting_global_crs_vis'), 'visible_crs');
332 $crs->setInfo($GLOBALS['lng']->txt('cal_setting_global_crs_vis_info'));
333 $crs->setValue(1);
334 $crs->setInfo($GLOBALS['lng']->txt('cal_setting_global_crs_vis_info'));
335 $crs->setChecked($this->settings->isCourseCalendarEnabled());
336 $this->form->addItem($crs);
337
338 $grp = new ilCheckboxInputGUI($GLOBALS['lng']->txt('cal_setting_global_grp_vis'), 'visible_grp');
339 $grp->setInfo($GLOBALS['lng']->txt('cal_setting_global_grp_vis_info'));
340 $grp->setValue(1);
341 $grp->setInfo($GLOBALS['lng']->txt('cal_setting_global_grp_vis_info'));
342 $grp->setChecked($this->settings->isGroupCalendarEnabled());
343 $this->form->addItem($grp);
344
345
346
347
348 // Notifications
349 $not = new ilFormSectionHeaderGUI();
350 $not->setTitle($this->lng->txt('notifications'));
351 $this->form->addItem($not);
352
353 $cgn = new ilCheckboxInputGUI($this->lng->txt('cal_notification'), 'cn');
354 $cgn->setOptionTitle($this->lng->txt('cal_notification_crsgrp'));
355 $cgn->setValue(1);
356 $cgn->setChecked($this->settings->isNotificationEnabled());
357 $cgn->setInfo($this->lng->txt('cal_adm_notification_info'));
358 $this->form->addItem($cgn);
359
360 $cnu = new ilCheckboxInputGUI('', 'cnu');
361 $cnu->setOptionTitle($this->lng->txt('cal_notification_users'));
362 $cnu->setValue(1);
363 $cnu->setChecked($this->settings->isUserNotificationEnabled());
364 $cnu->setInfo($this->lng->txt('cal_adm_notification_user_info'));
365 $this->form->addItem($cnu);
366
367
368 // Registration
369 $book = new ilFormSectionHeaderGUI();
370 $book->setTitle($this->lng->txt('cal_registrations'));
371 $this->form->addItem($book);
372
373 $cgn = new ilCheckboxInputGUI($this->lng->txt('cal_cg_registrations'), 'cgr');
374 $cgn->setValue(1);
375 $cgn->setChecked($this->settings->isCGRegistrationEnabled());
376 $cgn->setInfo($this->lng->txt('cal_cg_registration_info'));
377 $this->form->addItem($cgn);
378
379 // Synchronisation cache
380 $sec = new ilFormSectionHeaderGUI();
381 $sec->setTitle($this->lng->txt('cal_cache_settings'));
382 $this->form->addItem($sec);
383
384 $cache = new ilRadioGroupInputGUI($this->lng->txt('cal_sync_cache'), 'sync_cache');
385 $cache->setValue((int) $this->settings->isSynchronisationCacheEnabled());
386 $cache->setInfo($this->lng->txt('cal_sync_cache_info'));
387 $cache->setRequired(true);
388
389 $sync_cache = new ilRadioOption($this->lng->txt('cal_sync_disabled'), 0);
390 $cache->addOption($sync_cache);
391
392 $sync_cache = new ilRadioOption($this->lng->txt('cal_sync_enabled'), 1);
393 $cache->addOption($sync_cache);
394
395 $cache_t = new ilNumberInputGUI('', 'sync_cache_time');
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);
402
403 $this->form->addItem($cache);
404
405 // Calendar cache
406 $cache = new ilRadioGroupInputGUI($this->lng->txt('cal_cache'), 'cache');
407 $cache->setValue((int) $this->settings->isCacheUsed());
408 $cache->setInfo($this->lng->txt('cal_cache_info'));
409 $cache->setRequired(true);
410
411 $sync_cache = new ilRadioOption($this->lng->txt('cal_cache_disabled'), 0);
412 $cache->addOption($sync_cache);
413
414 $sync_cache = new ilRadioOption($this->lng->txt('cal_cache_enabled'), 1);
415 $cache->addOption($sync_cache);
416
417 $cache_t = new ilNumberInputGUI('', 'cache_time');
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);
425 }
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
static _getShortTimeZoneList()
get short timezone list
static getHourSelection($a_format)
Get hour selectio depending on user specific hour format.
This class represents a checkbox property in a property form.
This class represents a section header in a property form.
This class represents a non editable value in a property form.
This class represents a number property in a property form.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
This class represents a property form user interface.
This class represents a property in a property form.
This class represents an option in a radio group.
This class represents a selection list property in a property form.
static _getDefaultTimeZone()
Calculate and set default time zone.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
$sync

References $GLOBALS, $sync, ilTimeZone\_getDefaultTimeZone(), ilCalendarUtil\_getShortTimeZoneList(), ilObjectGUI\checkPermissionBool(), date, ilCalendarSettings\DATE_FORMAT_DMY, ilCalendarSettings\DATE_FORMAT_MDY, ilCalendarSettings\DATE_FORMAT_YMD, ilCalendarUtil\getHourSelection(), settings(), ilCalendarSettings\TIME_FORMAT_12, and ilCalendarSettings\TIME_FORMAT_24.

Referenced by settings().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ save()

ilObjCalendarSettingsGUI::save ( )
protected

save settings

@access protected

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

147 {
148 $this->checkPermission('write');
149
150 $this->settings->setEnabled((int) $_POST['enable']);
151 $this->settings->setDefaultWeekStart((int) $_POST['default_week_start']);
152 $this->settings->setDefaultTimeZone(ilUtil::stripSlashes($_POST['default_timezone']));
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']);
172
173 if (((int) $_POST['den']) < (int) $_POST['dst']) {
174 ilUtil::sendFailure($this->lng->txt('cal_dstart_dend_warn'));
175 $this->settings();
176 return false;
177 }
178
179 $this->settings->save();
180
181 ilUtil::sendSuccess($this->lng->txt('settings_saved'));
182 $this->settings();
183 }
$_POST["username"]
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
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

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

+ Here is the call graph for this function:

◆ settings()

ilObjCalendarSettingsGUI::settings ( )

Edit settings.

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

131 {
132 $this->checkPermission('read');
133
134 $this->tabs_gui->setTabActive('settings');
135 $this->initFormSettings();
136 $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.settings.html', 'Services/Calendar');
137 $this->tpl->setVariable('CAL_SETTINGS', $this->form->getHTML());
138 return true;
139 }
initFormSettings()
Init settings property form.

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

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

+ 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: