ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilObjPersonalDesktopSettingsGUI Class Reference

News Settings. More...

+ Inheritance diagram for ilObjPersonalDesktopSettingsGUI:
+ Collaboration diagram for ilObjPersonalDesktopSettingsGUI:

Public Member Functions

 __construct ($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
 Contructor. More...
 
 executeCommand ()
 Execute command. More...
 
 getAdminTabs ()
 Get tabs. More...
 
 editSettings ()
 Edit personal desktop settings. More...
 
 saveSettings ()
 Save personal desktop settings. More...
 
 editWsp ()
 Edit personal workspace settings. More...
 
 saveWsp ()
 Save personal desktop 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 Attributes

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

Static Private Attributes

static $ERROR_MESSAGE
 

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
 
- 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...
 

Detailed Description

News Settings.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

@ilCtrl_Calls ilObjPersonalDesktopSettingsGUI: ilPermissionGUI

Definition at line 17 of file class.ilObjPersonalDesktopSettingsGUI.php.

Constructor & Destructor Documentation

◆ __construct()

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

Contructor.

@access public

Definition at line 40 of file class.ilObjPersonalDesktopSettingsGUI.php.

41 {
42 global $DIC;
43
44 $this->lng = $DIC->language();
45 $this->rbacsystem = $DIC->rbac()->system();
46 $this->error = $DIC["ilErr"];
47 $this->access = $DIC->access();
48 $this->ctrl = $DIC->ctrl();
49 $this->settings = $DIC->settings();
50 $lng = $DIC->language();
51 $this->ui_factory = $DIC->ui()->factory();
52 $this->ui_renderer = $DIC->ui()->renderer();
53
54 $this->type = 'pdts';
55 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
56
57 $lng->loadLanguageModule("pd");
58
59 $this->viewSettings = new ilPDSelectedItemsBlockViewSettings($GLOBALS['DIC']->user());
60 }
user()
Definition: user.php:4
error($a_errmsg)
set error message @access public
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
global $DIC
Definition: saml.php:7
settings()
Definition: settings.php:2

References $DIC, $GLOBALS, ilObjectGUI\$lng, error(), settings(), and user().

+ Here is the call graph for this function:

Member Function Documentation

◆ addToExternalSettingsForm()

ilObjPersonalDesktopSettingsGUI::addToExternalSettingsForm (   $a_form_id)

Definition at line 478 of file class.ilObjPersonalDesktopSettingsGUI.php.

479 {
480 switch ($a_form_id) {
482
483 require_once 'Services/WebDAV/classes/class.ilObjDiskQuotaSettings.php';
484 $disk_quota_obj = ilObjDiskQuotaSettings::getInstance();
485
486 $fields = array('personal_workspace_disk_quota' => array($disk_quota_obj->isPersonalWorkspaceDiskQuotaEnabled(), ilAdministrationSettingsFormHandler::VALUE_BOOL));
487
488 return array(array("editWsp", $fields));
489 }
490 }
static getInstance()
Get settings instance.

References ilAdministrationSettingsFormHandler\FORM_FILES_QUOTA, ilObjDiskQuotaSettings\getInstance(), and ilAdministrationSettingsFormHandler\VALUE_BOOL.

+ Here is the call graph for this function:

◆ editSettings()

ilObjPersonalDesktopSettingsGUI::editSettings ( )

Edit personal desktop settings.

Definition at line 140 of file class.ilObjPersonalDesktopSettingsGUI.php.

141 {
145 $ilAccess = $this->access;
146
147 $pd_set = new ilSetting("pd");
148
149 $enable_calendar = ilCalendarSettings::_getInstance()->isEnabled();
150 #$enable_calendar = $ilSetting->get("enable_calendar");
151 $enable_block_moving = $pd_set->get("enable_block_moving");
152 $enable_active_users = $ilSetting->get("block_activated_pdusers");
153
154 include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
155 $form = new ilPropertyFormGUI();
156 $form->setFormAction($ilCtrl->getFormAction($this));
157 $form->setTitle($lng->txt("pd_settings"));
158
159 // Enable calendar
160 $cb_prop = new ilCheckboxInputGUI($lng->txt("enable_calendar"), "enable_calendar");
161 $cb_prop->setValue("1");
162 //$cb_prop->setInfo($lng->txt("pd_enable_block_moving_info"));
163 $cb_prop->setChecked($enable_calendar);
164 $form->addItem($cb_prop);
165
166 // Enable bookmarks
167 $cb_prop = new ilCheckboxInputGUI($lng->txt("pd_enable_bookmarks"), "enable_bookmarks");
168 $cb_prop->setValue("1");
169 $cb_prop->setChecked(($ilSetting->get("disable_bookmarks") ? "0" : "1"));
170 $form->addItem($cb_prop);
171
172 // Enable notes
173 $cb_prop = new ilCheckboxInputGUI($lng->txt("pd_enable_notes"), "enable_notes");
174 $cb_prop->setValue("1");
175 $cb_prop->setChecked(($ilSetting->get("disable_notes") ? "0" : "1"));
176 $form->addItem($cb_prop);
177
178 // Enable notes
179 $cb_prop = new ilCheckboxInputGUI($lng->txt("pd_enable_comments"), "enable_comments");
180 $cb_prop->setValue("1");
181 $cb_prop->setChecked(($ilSetting->get("disable_comments") ? "0" : "1"));
182 $form->addItem($cb_prop);
183
184 $comm_del_user = new ilCheckboxInputGUI($lng->txt("pd_enable_comments_del_user"), "comm_del_user");
185 $comm_del_user->setChecked($ilSetting->get("comments_del_user", 0));
186 $cb_prop->addSubItem($comm_del_user);
187
188 $comm_del_tutor = new ilCheckboxInputGUI($lng->txt("pd_enable_comments_del_tutor"), "comm_del_tutor");
189 $comm_del_tutor->setInfo($lng->txt("pd_enable_comments_del_tutor_info"));
190 $comm_del_tutor->setChecked($ilSetting->get("comments_del_tutor", 1));
191 $cb_prop->addSubItem($comm_del_tutor);
192
193 $ti = new ilTextInputGUI($this->lng->txt("pd_comments_notification"), "comments_noti_recip");
194 $ti->setValue($ilSetting->get("comments_noti_recip"));
195 $ti->setMaxLength(200);
196 $ti->setInfo($this->lng->txt("pd_comments_notification_info"));
197 $cb_prop->addSubItem($ti);
198
199 // Enable Chatviewer
200 $cb_prop = new ilCheckboxInputGUI($lng->txt("pd_enable_chatviewer"), "block_activated_chatviewer");
201 $cb_prop->setValue("1");
202 $cb_prop->setChecked(($ilSetting->get("block_activated_chatviewer")));
203 $form->addItem($cb_prop);
204
205 require_once 'Services/Mail/classes/class.ilObjMail.php';
206 $pd_sys_msg = new ilRadioGroupInputGUI($lng->txt('show_system_messages'), 'pd_sys_msg_mode');
207
208 $sys_msg_own_block = new ilRadioOption($lng->txt('pd_sys_msg_own_block'), ilObjMail::PD_SYS_MSG_OWN_BLOCK);
209 $pd_sys_msg->addOption($sys_msg_own_block);
210
211 $sys_msg_mail_block = new ilRadioOption($lng->txt('pd_sys_msg_mail_block'), ilObjMail::PD_SYS_MSG_MAIL_BLOCK);
212 $pd_sys_msg->addOption($sys_msg_mail_block);
213
214 $sys_msg_own_block = new ilRadioOption($lng->txt('pd_sys_msg_no_block'), ilObjMail::PD_SYS_MSG_NO_BLOCK);
215 $pd_sys_msg->addOption($sys_msg_own_block);
216
217 $pd_sys_msg->setValue((int) ($ilSetting->get('pd_sys_msg_mode')));
218 $form->addItem($pd_sys_msg);
219
220 if ($ilSetting->get('save_post_drafts', 0)) {
221 $cb_prop = new ilCheckboxInputGUI($lng->txt('pd_enable_pdfrmpostdraft'), 'block_activated_pdfrmpostdraft');
222 $cb_prop->setInfo($lng->txt('pd_enable_pdfrmpostdraft_info'));
223 $cb_prop->setValue(1);
224 $cb_prop->setChecked($ilSetting->get('block_activated_pdfrmpostdraft', 0));
225 $form->addItem($cb_prop);
226 }
227 // Enable block moving
228 $cb_prop = new ilCheckboxInputGUI(
229 $lng->txt("pd_enable_block_moving"),
230 "enable_block_moving"
231 );
232 $cb_prop->setValue("1");
233 $cb_prop->setInfo($lng->txt("pd_enable_block_moving_info"));
234 $cb_prop->setChecked($enable_block_moving);
235 $form->addItem($cb_prop);
236
237 // Enable active users block
238 /*
239 $cb_prop = new ilCheckboxInputGUI($lng->txt("pd_enable_active_users"),
240 "block_activated_pdusers");
241 $cb_prop->setValue("1");
242 $cb_prop->setChecked($enable_active_users);
243
244 // maximum inactivity time
245 $ti_prop = new ilNumberInputGUI($lng->txt("pd_time_before_removal"),
246 "time_removal");
247 $ti_prop->setValue($pd_set->get("user_activity_time"));
248 $ti_prop->setInfo($lng->txt("pd_time_before_removal_info"));
249 $ti_prop->setMaxLength(3);
250 $ti_prop->setSize(3);
251 $cb_prop->addSubItem($ti_prop);
252
253 $form->addItem($cb_prop);
254 */
255 // Enable 'My Offers' (default personal items)
256 $cb_prop = new ilCheckboxInputGUI($lng->txt('pd_enable_my_offers'), 'enable_my_offers');
257 $cb_prop->setValue('1');
258 $cb_prop->setInfo($lng->txt('pd_enable_my_offers_info'));
259 $cb_prop->setChecked($this->viewSettings->enabledSelectedItems());
260 $form->addItem($cb_prop);
261
262 // Enable 'My Memberships'
263 $cb_prop = new ilCheckboxInputGUI($lng->txt('pd_enable_my_memberships'), 'enable_my_memberships');
264 $cb_prop->setValue('1');
265 $cb_prop->setInfo($lng->txt('pd_enable_my_memberships_info'));
266 $cb_prop->setChecked($this->viewSettings->enabledMemberships());
267 $form->addItem($cb_prop);
268
269 $memberships_sort_defaults = new ilRadioGroupInputGUI($lng->txt('pd_my_memberships_sort_default'), 'my_memberships_sort_default');
270 $memberships_sort_defaults->addOption(new ilRadioOption($lng->txt('pd_sort_by_location'), $this->viewSettings->getSortByLocationMode()));
271 $memberships_sort_defaults->addOption(new ilRadioOption($lng->txt('pd_sort_by_type'), $this->viewSettings->getSortByTypeMode()));
272 $memberships_sort_defaults->addOption(new ilRadioOption($lng->txt('pd_sort_by_start_date'), $this->viewSettings->getSortByStartDateMode()));
273 $memberships_sort_defaults->setRequired(true);
274 $memberships_sort_defaults->setValue($this->viewSettings->getDefaultSortType());
275 $cb_prop->addSubItem($memberships_sort_defaults);
276
277 #22357
278 $this->ctrl->setParameterByClass("iluserstartingpointgui", "ref_id", USER_FOLDER_ID);
279 $url = $this->ctrl->getLinkTargetByClass(array("iladministrationgui","ilobjuserfoldergui", "iluserstartingpointgui"), "startingpoints");
280 $this->ctrl->setParameterByClass("iluserstartingpointgui", "ref_id", $_GET['ref_id']);
281
282 $lng->loadLanguageModule("user");
283 $starting_point_button = $this->ui_factory->button()->shy($lng->txt("starting_points"), $url);
284 $button = new ilCustomInputGUI($lng->txt('pd_personal_items_default_view'), '');
285 $button->setHtml($this->ui_renderer->render($starting_point_button));
286 $form->addItem($button);
287
288 if ($ilAccess->checkAccess('write', '', $this->object->getRefId())) {
289 // command buttons
290 $form->addCommandButton("saveSettings", $lng->txt("save"));
291 $form->addCommandButton("view", $lng->txt("cancel"));
292 }
293
294 $this->tpl->setContent($form->getHTML());
295 }
$_GET["client_id"]
const USER_FOLDER_ID
Class ilObjUserFolder.
static _getInstance()
get singleton instance
This class represents a checkbox property in a property form.
This class represents a custom property in a property form.
const PD_SYS_MSG_OWN_BLOCK
const PD_SYS_MSG_NO_BLOCK
const PD_SYS_MSG_MAIL_BLOCK
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.
ILIAS Setting Class.
This class represents a text property in a property form.
global $ilCtrl
Definition: ilias.php:18
global $ilSetting
Definition: privfeed.php:17
$url
if(isset($_POST['submit'])) $form

References $_GET, ilObjectGUI\$access, ilObjectGUI\$ctrl, $form, $ilCtrl, $ilSetting, ilObjectGUI\$lng, ilObjectGUI\$settings, $url, ilCalendarSettings\_getInstance(), ilObjMail\PD_SYS_MSG_MAIL_BLOCK, ilObjMail\PD_SYS_MSG_NO_BLOCK, ilObjMail\PD_SYS_MSG_OWN_BLOCK, and USER_FOLDER_ID.

+ Here is the call graph for this function:

◆ editWsp()

ilObjPersonalDesktopSettingsGUI::editWsp ( )

Edit personal workspace settings.

Definition at line 360 of file class.ilObjPersonalDesktopSettingsGUI.php.

361 {
365 $ilAccess = $this->access;
366
367 include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
368 $form = new ilPropertyFormGUI();
369 $form->setFormAction($ilCtrl->getFormAction($this, "saveWsp"));
370 $form->setTitle($lng->txt("pd_personal_workspace"));
371
372 // Enable 'Personal Workspace'
373 $wsp_prop = new ilCheckboxInputGUI($lng->txt('pd_enable_personal_workspace'), 'wsp');
374 $wsp_prop->setValue('1');
375 $wsp_prop->setChecked(($ilSetting->get('disable_personal_workspace') ? '0' : '1'));
376 $form->addItem($wsp_prop);
377
378 // Enable 'Blogs'
379 $blog_prop = new ilCheckboxInputGUI($lng->txt('pd_enable_wsp_blogs'), 'blog');
380 $blog_prop->setValue('1');
381 $blog_prop->setChecked(($ilSetting->get('disable_wsp_blogs') ? '0' : '1'));
382 $wsp_prop->addSubItem($blog_prop);
383
384 // Enable 'Files'
385 $file_prop = new ilCheckboxInputGUI($lng->txt('pd_enable_wsp_files'), 'file');
386 $file_prop->setValue('1');
387 $file_prop->setChecked(($ilSetting->get('disable_wsp_files') ? '0' : '1'));
388 $wsp_prop->addSubItem($file_prop);
389
390 // Enable 'Certificates'
391 $cert_prop = new ilCheckboxInputGUI($lng->txt('pd_enable_wsp_certificates'), 'cert');
392 $cert_prop->setValue('1');
393 $cert_prop->setChecked(($ilSetting->get('disable_wsp_certificates') ? '0' : '1'));
394 $wsp_prop->addSubItem($cert_prop);
395
396 // Enable 'Links'
397 $link_prop = new ilCheckboxInputGUI($lng->txt('pd_enable_wsp_links'), 'link');
398 $link_prop->setValue('1');
399 $link_prop->setChecked(($ilSetting->get('disable_wsp_links') ? '0' : '1'));
400 $wsp_prop->addSubItem($link_prop);
401
402 /*
403 // Enable 'Portfolios'
404 $lng->loadLanguageModule('user');
405 $prtf_prop = new ilCheckboxInputGUI($lng->txt('pd_enable_prtf'), 'prtf');
406 $prtf_prop->setValue('1');
407 $prtf_prop->setInfo($lng->txt('user_portfolios_desc'));
408 $prtf_prop->setChecked(($ilSetting->get('user_portfolios') ? '1' : '0'));
409 $form->addItem($prtf_prop);
410 */
411
412 // Load the disk quota settings object
413 require_once 'Services/WebDAV/classes/class.ilObjDiskQuotaSettings.php';
414 $disk_quota_obj = ilObjDiskQuotaSettings::getInstance();
415
416 // Enable disk quota
417 $lng->loadLanguageModule("file");
418 $cb_prop = new ilCheckboxInputGUI($lng->txt("personal_workspace_disk_quota"), "enable_personal_workspace_disk_quota");
419 $cb_prop->setValue('1');
420 $cb_prop->setChecked($disk_quota_obj->isPersonalWorkspaceDiskQuotaEnabled());
421 $cb_prop->setInfo($lng->txt('enable_personal_workspace_disk_quota_info'));
422 $form->addItem($cb_prop);
423
424 require_once 'Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php';
427 $form,
428 $this
429 );
430
431 if ($ilAccess->checkAccess('write', '', $this->object->getRefId())) {
432 // command buttons
433 $form->addCommandButton("saveWsp", $lng->txt("save"));
434 $form->addCommandButton("editWsp", $lng->txt("cancel"));
435 }
436
437 $this->tpl->setContent($form->getHTML());
438 }
static addFieldsToForm($a_form_id, ilPropertyFormGUI $a_form, ilObjectGUI $a_parent_gui)

References ilObjectGUI\$access, ilObjectGUI\$ctrl, $form, $ilCtrl, $ilSetting, ilObjectGUI\$lng, ilObjectGUI\$settings, ilAdministrationSettingsFormHandler\addFieldsToForm(), ilAdministrationSettingsFormHandler\FORM_WSP, and ilObjDiskQuotaSettings\getInstance().

+ Here is the call graph for this function:

◆ executeCommand()

ilObjPersonalDesktopSettingsGUI::executeCommand ( )

Execute command.

@access public

Reimplemented from ilObjectGUI.

Definition at line 68 of file class.ilObjPersonalDesktopSettingsGUI.php.

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

References ilObjectGUI\$access, $error, ilObjectGUI\$ilErr, $rbacsystem, $ret, and ilObjectGUI\prepareOutput().

+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjPersonalDesktopSettingsGUI::getAdminTabs ( )

Get tabs.

@access public

Reimplemented from ilObjectGUI.

Definition at line 108 of file class.ilObjPersonalDesktopSettingsGUI.php.

109 {
111 $ilAccess = $this->access;
112
113 if ($rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
114 $this->tabs_gui->addTarget(
115 "pd_settings",
116 $this->ctrl->getLinkTarget($this, "editSettings"),
117 array("editSettings", "view")
118 );
119
120 $this->tabs_gui->addTarget(
121 "pd_personal_workspace",
122 $this->ctrl->getLinkTarget($this, "editWsp"),
123 array("editWsp")
124 );
125 }
126
127 if ($rbacsystem->checkAccess('edit_permission', $this->object->getRefId())) {
128 $this->tabs_gui->addTarget(
129 "perm_settings",
130 $this->ctrl->getLinkTargetByClass('ilpermissiongui', "perm"),
131 array(),
132 'ilpermissiongui'
133 );
134 }
135 }

References ilObjectGUI\$access, and $rbacsystem.

◆ saveSettings()

ilObjPersonalDesktopSettingsGUI::saveSettings ( )

Save personal desktop settings.

Definition at line 300 of file class.ilObjPersonalDesktopSettingsGUI.php.

301 {
304 $ilAccess = $this->access;
305
306 if (!$ilAccess->checkAccess('write', '', $this->object->getRefId())) {
307 $ilCtrl->redirect($this, "view");
308 }
309
310 $pd_set = new ilSetting("pd");
311
312 ilCalendarSettings::_getInstance()->setEnabled($_POST["enable_calendar"]);
314
315 #$ilSetting->set("enable_calendar", $_POST["enable_calendar"]);
316 $ilSetting->set("disable_bookmarks", (int) ($_POST["enable_bookmarks"] ? 0 : 1));
317
318 $ilSetting->set("disable_notes", (int) ($_POST["enable_notes"] ? 0 : 1));
319 $ilSetting->set("disable_comments", (int) ($_POST["enable_comments"] ? 0 : 1));
320
321 $ilSetting->set("comments_del_user", (int) ($_POST["comm_del_user"] ? 1 : 0));
322 $ilSetting->set("comments_del_tutor", (int) ($_POST["comm_del_tutor"] ? 1 : 0));
323 $ilSetting->set("comments_noti_recip", ilUtil::stripSlashes($_POST["comments_noti_recip"]));
324
325 $ilSetting->set("block_activated_chatviewer", (int) ($_POST["block_activated_chatviewer"]));
326 $ilSetting->set("pd_sys_msg_mode", (int) ($_POST["pd_sys_msg_mode"]));
327 if ($ilSetting->get('save_post_drafts', 0)) {
328 $ilSetting->set("block_activated_pdfrmpostdraft", (int) $_POST["block_activated_pdfrmpostdraft"]);
329 }
330 // $ilSetting->set("block_activated_pdusers", $_POST["block_activated_pdusers"]);
331 $pd_set->set("enable_block_moving", $_POST["enable_block_moving"]);
332 // $pd_set->set("user_activity_time", (int) $_POST["time_removal"]);
333
334 // Validate personal desktop view
335 if (!(int) $_POST['enable_my_offers'] && !(int) $_POST['enable_my_memberships']) {
336 ilUtil::sendFailure($this->lng->txt('pd_view_select_at_least_one'), true);
337 $ilCtrl->redirect($this, 'view');
338 }
339
340 $this->viewSettings->enableSelectedItems((int) ($_POST['enable_my_offers'] ? 1 : 0));
341 $this->viewSettings->enableMemberships((int) ($_POST['enable_my_memberships'] ? 1 : 0));
342
343 if ((int) $_POST['enable_my_offers'] && !(int) $_POST['enable_my_memberships']) {
344 $this->viewSettings->storeDefaultView($this->viewSettings->getSelectedItemsView());
345 } elseif (!(int) $_POST['enable_my_offers'] && (int) $_POST['enable_my_memberships']) {
346 $this->viewSettings->storeDefaultView($this->viewSettings->getMembershipsView());
347 } elseif (isset($_POST['personal_items_default_view'])) {
348 $this->viewSettings->storeDefaultView((int) $_POST['personal_items_default_view']);
349 }
350
351 $this->viewSettings->storeDefaultSortType(ilUtil::stripSlashes($_POST['my_memberships_sort_default']));
352
353 ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
354 $ilCtrl->redirect($this, "view");
355 }
$_POST["username"]
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\$access, ilObjectGUI\$ctrl, $ilCtrl, $ilSetting, ilObjectGUI\$settings, ilCalendarSettings\_getInstance(), ilUtil\sendFailure(), ilUtil\sendSuccess(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ saveWsp()

ilObjPersonalDesktopSettingsGUI::saveWsp ( )

Save personal desktop settings.

Definition at line 443 of file class.ilObjPersonalDesktopSettingsGUI.php.

444 {
447 $ilAccess = $this->access;
448
449 if (!$ilAccess->checkAccess('write', '', $this->object->getRefId())) {
450 $ilCtrl->redirect($this, "view");
451 }
452
453 // without personal workspace we have to disable to sub-items
454 if (!$_POST["wsp"]) {
455 $_POST["blog"] = 0;
456 $_POST["file"] = 0;
457 $_POST["cert"] = 0;
458 $_POST["link"] = 0;
459 }
460
461 $ilSetting->set('disable_personal_workspace', (int) ($_POST['wsp'] ? 0 : 1));
462 $ilSetting->set('disable_wsp_blogs', (int) ($_POST['blog'] ? 0 : 1));
463 $ilSetting->set('disable_wsp_files', (int) ($_POST['file'] ? 0 : 1));
464 $ilSetting->set('disable_wsp_certificates', (int) ($_POST['cert'] ? 0 : 1));
465 $ilSetting->set('disable_wsp_links', (int) ($_POST['link'] ? 0 : 1));
466 // $ilSetting->set('user_portfolios', (int)($_POST['prtf'] ? 1 : 0));
467
468 // Load the disk quota settings object
469 require_once 'Services/WebDAV/classes/class.ilObjDiskQuotaSettings.php';
470 $disk_quota_obj = ilObjDiskQuotaSettings::getInstance();
471 $disk_quota_obj->setPersonalWorkspaceDiskQuotaEnabled($_POST['enable_personal_workspace_disk_quota'] == '1');
472 $disk_quota_obj->update();
473
474 ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
475 $ilCtrl->redirect($this, "editWsp");
476 }

References $_POST, ilObjectGUI\$access, ilObjectGUI\$ctrl, $ilCtrl, $ilSetting, ilObjectGUI\$settings, ilObjDiskQuotaSettings\getInstance(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

Field Documentation

◆ $error

ilObjPersonalDesktopSettingsGUI::$error
protected

Definition at line 27 of file class.ilObjPersonalDesktopSettingsGUI.php.

Referenced by executeCommand().

◆ $ERROR_MESSAGE

ilObjPersonalDesktopSettingsGUI::$ERROR_MESSAGE
staticprivate

Definition at line 29 of file class.ilObjPersonalDesktopSettingsGUI.php.

◆ $rbacsystem

ilObjPersonalDesktopSettingsGUI::$rbacsystem
protected

Definition at line 22 of file class.ilObjPersonalDesktopSettingsGUI.php.

Referenced by executeCommand(), and getAdminTabs().

◆ $viewSettings

ilObjPersonalDesktopSettingsGUI::$viewSettings
protected

Definition at line 34 of file class.ilObjPersonalDesktopSettingsGUI.php.


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