ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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 ()
 viewObject container presentation for "administration -> repository, trash, permissions" 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...
 
 addToDeskObject ()
 @inheritDoc More...
 
 removeFromDeskObject ()
 @inheritDoc 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...
 
 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

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

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

59 {
60 global $DIC;
61
62 $this->type = 'cals';
63 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
64
65 $this->dic = $DIC;
66 $this->error = $DIC['ilErr'];
67 ;
68 $this->rbacsystem = $this->dic->rbac()->system();
69 $this->lng = $this->dic->language();
70 $this->lng->loadLanguageModule('dateplaner');
71 $this->lng->loadLanguageModule('jscalendar');
72 }
error($a_errmsg)
set error message @access public
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$DIC
Definition: xapitoken.php:46

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), and error().

+ Here is the call graph for this function:

Member Function Documentation

◆ addToExternalSettingsForm()

ilObjCalendarSettingsGUI::addToExternalSettingsForm (   $a_form_id)

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

449 {
450 switch ($a_form_id) {
452
453 $this->initCalendarSettings();
454
455 $fields = array();
456
457 $subitems = array('cal_setting_global_crs_vis' => array($this->settings->isCourseCalendarEnabled(), ilAdministrationSettingsFormHandler::VALUE_BOOL));
458 $fields['cal_setting_global_vis_repos'] = array(null, null, $subitems);
459
460 $subitems = array(
461 'cal_notification_crsgrp' => array($this->settings->isNotificationEnabled(), ilAdministrationSettingsFormHandler::VALUE_BOOL),
462 'cal_notification_users' => array($this->settings->isUserNotificationEnabled(), ilAdministrationSettingsFormHandler::VALUE_BOOL)
463 );
464 $fields['cal_notification'] = array(null, null, $subitems);
465
466 $fields['cal_cg_registrations'] = array($this->settings->isCGRegistrationEnabled(), ilAdministrationSettingsFormHandler::VALUE_BOOL);
467
468 return array(array("settings", $fields));
469
471
472 $this->initCalendarSettings();
473
474 $fields = array();
475
476 $subitems = array('cal_setting_global_grp_vis' => array($this->settings->isGroupCalendarEnabled(), ilAdministrationSettingsFormHandler::VALUE_BOOL));
477 $fields['cal_setting_global_vis_repos'] = array(null, null, $subitems);
478
479 $subitems = array(
480 'cal_notification_crsgrp' => array($this->settings->isNotificationEnabled(), ilAdministrationSettingsFormHandler::VALUE_BOOL),
481 'cal_notification_users' => array($this->settings->isUserNotificationEnabled(), ilAdministrationSettingsFormHandler::VALUE_BOOL)
482 );
483 $fields['cal_notification'] = array(null, null, $subitems);
484
485 $fields['cal_cg_registrations'] = array($this->settings->isCGRegistrationEnabled(), ilAdministrationSettingsFormHandler::VALUE_BOOL);
486
487 return array(array("settings", $fields));
488 }
489 }
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 80 of file class.ilObjCalendarSettingsGUI.php.

81 {
82 $next_class = $this->ctrl->getNextClass($this);
83 $cmd = $this->ctrl->getCmd();
84
85 $this->prepareOutput();
86
87 if (!$this->rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
88 $this->error->raiseError($this->lng->txt('no_permission'), $this->error->WARNING);
89 }
90
91 switch ($next_class) {
92 case 'ilpermissiongui':
93 $this->tabs_gui->setTabActive('perm_settings');
94 include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
95 $perm_gui = new ilPermissionGUI($this);
96 $ret = &$this->ctrl->forwardCommand($perm_gui);
97 break;
98
99 default:
100 $this->tabs_gui->setTabActive('settings');
101 $this->initCalendarSettings();
102 if (!$cmd || $cmd == 'view') {
103 $cmd = "settings";
104 }
105
106 $this->$cmd();
107 break;
108 }
109 return true;
110 }
prepareOutput($a_show_subobjects=true)
prepare output
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
$ret
Definition: parser.php:6

References $ret, error(), 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 119 of file class.ilObjCalendarSettingsGUI.php.

120 {
121 global $DIC;
122
123 $rbacsystem = $DIC['rbacsystem'];
124 $ilAccess = $DIC['ilAccess'];
125
126 if ($ilAccess->checkAccess("read", '', $this->object->getRefId())) {
127 $this->tabs_gui->addTarget(
128 "settings",
129 $this->ctrl->getLinkTarget($this, "settings"),
130 array("settings", "view")
131 );
132 }
133
134 if ($ilAccess->checkAccess('edit_permission', '', $this->object->getRefId())) {
135 $this->tabs_gui->addTarget(
136 "perm_settings",
137 $this->ctrl->getLinkTargetByClass('ilpermissiongui', "perm"),
138 array(),
139 'ilpermissiongui'
140 );
141 }
142 }

References $DIC, and $rbacsystem.

◆ initCalendarSettings()

ilObjCalendarSettingsGUI::initCalendarSettings ( )
protected

init calendar settings

@access protected

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

212 {
213 include_once('Services/Calendar/classes/class.ilCalendarSettings.php');
215 }
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 222 of file class.ilObjCalendarSettingsGUI.php.

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

References $GLOBALS, ilTimeZone\_getDefaultTimeZone(), ilCalendarUtil\_getShortTimeZoneList(), ilObjectGUI\checkPermissionBool(), 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 167 of file class.ilObjCalendarSettingsGUI.php.

168 {
169 $this->checkPermission('write');
170
171 $this->settings->setEnabled((int) $_POST['enable']);
172 $this->settings->setDefaultWeekStart((int) $_POST['default_week_start']);
173 $this->settings->setDefaultTimeZone(ilUtil::stripSlashes($_POST['default_timezone']));
174 $this->settings->setDefaultDateFormat((int) $_POST['default_date_format']);
175 $this->settings->setDefaultTimeFormat((int) $_POST['default_time_format']);
176 $this->settings->setEnableGroupMilestones((int) $_POST['enable_grp_milestones']);
177 $this->settings->enableCourseCalendar((int) $_POST['visible_crs']);
178 $this->settings->enableGroupCalendar((int) $_POST['visible_grp']);
179 $this->settings->setDefaultDayStart((int) $_POST['dst']);
180 $this->settings->setDefaultDayEnd((int) $_POST['den']);
181 $this->settings->enableSynchronisationCache((bool) $_POST['sync_cache']);
182 $this->settings->setSynchronisationCacheMinutes((int) $_POST['sync_cache_time']);
183 $this->settings->setCacheMinutes((int) $_POST['cache_time']);
184 $this->settings->useCache((bool) $_POST['cache']);
185 $this->settings->enableNotification((bool) $_POST['cn']);
186 $this->settings->enableUserNotification((bool) $_POST['cnu']);
187 $this->settings->enableConsultationHours((bool) $_POST['ch']);
188 $this->settings->enableCGRegistration((bool) $_POST['cgr']);
189 $this->settings->enableWebCalSync((bool) $_POST['webcal']);
190 $this->settings->setWebCalSyncHours((int) $_POST['webcal_hours']);
191 $this->settings->setShowWeeks((int) $_POST['show_weeks']);
192 $this->settings->enableBatchFileDownloads((bool) $_POST['batch_files']);
193
194 if (((int) $_POST['den']) < (int) $_POST['dst']) {
195 ilUtil::sendFailure($this->lng->txt('cal_dstart_dend_warn'));
196 $this->settings();
197 return false;
198 }
199
200 $this->settings->save();
201
202 ilUtil::sendSuccess($this->lng->txt('settings_saved'));
203 $this->settings();
204 }
$_POST["username"]
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
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(), settings(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ settings()

ilObjCalendarSettingsGUI::settings ( )

Edit settings.

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

148 {
149 global $ilErr;
150
151 if (!$this->rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
152 $ilErr->raiseError($this->lng->txt('no_permission'), $ilErr->WARNING);
153 }
154
155 $this->tabs_gui->setTabActive('settings');
156 $this->initFormSettings();
157 $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.settings.html', 'Services/Calendar');
158 $this->tpl->setVariable('CAL_SETTINGS', $this->form->getHTML());
159 return true;
160 }
initFormSettings()
Init settings property form.

References ilObjectGUI\$ilErr, 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

◆ $dic

ilObjCalendarSettingsGUI::$dic
protected

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

◆ $error

ilObjCalendarSettingsGUI::$error
protected

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

◆ $rbacsystem

ilObjCalendarSettingsGUI::$rbacsystem
protected

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

Referenced by getAdminTabs().

◆ $settings

ilObjCalendarSettingsGUI::$settings
protected

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


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