ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 editObject ()
 edit object More...
 
 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...
 

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
 
 $ilias
 
 $objDefinition
 
 $tpl
 
 $tree
 
 $lng
 
 $data
 
 $object
 
 $ref_id
 
 $obj_id
 
 $maxcount
 
 $formaction
 
 $return_location
 
 $target_frame
 
 $tab_target_script
 
 $actions
 
 $sub_objects
 
 $omit_locator = false
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 
- 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 public More...
 
 setAdminTabs ()
 set admin tabs public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 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 inherited from ilObjectGUI
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

Contructor.

public

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

References ilObjectGUI\$lng.

25  {
26  global $lng;
27 
28  $this->type = 'pdts';
29  parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
30 
31  $lng->loadLanguageModule("pd");
32  }

Member Function Documentation

◆ addToExternalSettingsForm()

ilObjPersonalDesktopSettingsGUI::addToExternalSettingsForm (   $a_form_id)

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

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

440  {
441  switch($a_form_id)
442  {
444 
445  require_once 'Services/WebDAV/classes/class.ilObjDiskQuotaSettings.php';
446  $disk_quota_obj = ilObjDiskQuotaSettings::getInstance();
447 
448  $fields = array('personal_workspace_disk_quota' => array($disk_quota_obj->isPersonalWorkspaceDiskQuotaEnabled(), ilAdministrationSettingsFormHandler::VALUE_BOOL));
449 
450  return array(array("editWsp", $fields));
451  }
452  }
Create styles array
The data for the language used.
static getInstance()
Get settings instance.
+ Here is the call graph for this function:

◆ editSettings()

ilObjPersonalDesktopSettingsGUI::editSettings ( )

Edit personal desktop settings.

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

References $ilCtrl, $ilSetting, ilObjectGUI\$lng, ilCalendarSettings\_getInstance(), array, ilObjMail\PD_SYS_MSG_MAIL_BLOCK, ilObjMail\PD_SYS_MSG_NO_BLOCK, ilObjMail\PD_SYS_MSG_OWN_BLOCK, ilCheckboxInputGUI\setChecked(), ilFormPropertyGUI\setInfo(), ilTextInputGUI\setValue(), ilCheckboxInputGUI\setValue(), and ilRadioOption\setValue().

108  {
109  global $ilCtrl, $lng, $ilSetting, $ilAccess;
110 
111  $pd_set = new ilSetting("pd");
112 
113  $enable_calendar = ilCalendarSettings::_getInstance()->isEnabled();
114  #$enable_calendar = $ilSetting->get("enable_calendar");
115  $enable_block_moving = $pd_set->get("enable_block_moving");
116  $enable_active_users = $ilSetting->get("block_activated_pdusers");
117 
118  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
119  $form = new ilPropertyFormGUI();
120  $form->setFormAction($ilCtrl->getFormAction($this));
121  $form->setTitle($lng->txt("pd_settings"));
122 
123  // Enable calendar
124  $cb_prop = new ilCheckboxInputGUI($lng->txt("enable_calendar"), "enable_calendar");
125  $cb_prop->setValue("1");
126  //$cb_prop->setInfo($lng->txt("pd_enable_block_moving_info"));
127  $cb_prop->setChecked($enable_calendar);
128  $form->addItem($cb_prop);
129 
130  // Enable bookmarks
131  $cb_prop = new ilCheckboxInputGUI($lng->txt("pd_enable_bookmarks"), "enable_bookmarks");
132  $cb_prop->setValue("1");
133  $cb_prop->setChecked(($ilSetting->get("disable_bookmarks") ? "0" : "1"));
134  $form->addItem($cb_prop);
135 
136  // Enable notes
137  $cb_prop = new ilCheckboxInputGUI($lng->txt("pd_enable_notes"), "enable_notes");
138  $cb_prop->setValue("1");
139  $cb_prop->setChecked(($ilSetting->get("disable_notes") ? "0" : "1"));
140  $form->addItem($cb_prop);
141 
142  // Enable notes
143  $cb_prop = new ilCheckboxInputGUI($lng->txt("pd_enable_comments"), "enable_comments");
144  $cb_prop->setValue("1");
145  $cb_prop->setChecked(($ilSetting->get("disable_comments") ? "0" : "1"));
146  $form->addItem($cb_prop);
147 
148  $comm_del_user = new ilCheckboxInputGUI($lng->txt("pd_enable_comments_del_user"), "comm_del_user");
149  $comm_del_user->setChecked($ilSetting->get("comments_del_user", 0));
150  $cb_prop->addSubItem($comm_del_user);
151 
152  $comm_del_tutor = new ilCheckboxInputGUI($lng->txt("pd_enable_comments_del_tutor"), "comm_del_tutor");
153  $comm_del_tutor->setInfo($lng->txt("pd_enable_comments_del_tutor_info"));
154  $comm_del_tutor->setChecked($ilSetting->get("comments_del_tutor", 1));
155  $cb_prop->addSubItem($comm_del_tutor);
156 
157  $ti = new ilTextInputGUI($this->lng->txt("pd_comments_notification"), "comments_noti_recip");
158  $ti->setValue($ilSetting->get("comments_noti_recip"));
159  $ti->setMaxLength(200);
160  $ti->setInfo($this->lng->txt("pd_comments_notification_info"));
161  $cb_prop->addSubItem($ti);
162 
163  // Enable Chatviewer
164  $cb_prop = new ilCheckboxInputGUI($lng->txt("pd_enable_chatviewer"), "block_activated_chatviewer");
165  $cb_prop->setValue("1");
166  $cb_prop->setChecked(($ilSetting->get("block_activated_chatviewer")));
167  $form->addItem($cb_prop);
168 
169  require_once 'Services/Mail/classes/class.ilObjMail.php';
170  $pd_sys_msg = new ilRadioGroupInputGUI($lng->txt('show_system_messages'), 'pd_sys_msg_mode');
171 
172  $sys_msg_own_block = new ilRadioOption($lng->txt('pd_sys_msg_own_block'), ilObjMail::PD_SYS_MSG_OWN_BLOCK);
173  $pd_sys_msg->addOption($sys_msg_own_block);
174 
175  $sys_msg_mail_block = new ilRadioOption($lng->txt('pd_sys_msg_mail_block'), ilObjMail::PD_SYS_MSG_MAIL_BLOCK);
176  $pd_sys_msg->addOption($sys_msg_mail_block);
177 
178  $sys_msg_own_block = new ilRadioOption($lng->txt('pd_sys_msg_no_block'), ilObjMail::PD_SYS_MSG_NO_BLOCK);
179  $pd_sys_msg->addOption($sys_msg_own_block);
180 
181  $pd_sys_msg->setValue((int)($ilSetting->get('pd_sys_msg_mode')));
182  $form->addItem($pd_sys_msg);
183 
184  if($ilSetting->get('save_post_drafts', 0))
185  {
186  $cb_prop = new ilCheckboxInputGUI($lng->txt('pd_enable_pdfrmpostdraft'), 'block_activated_pdfrmpostdraft');
187  $cb_prop->setInfo($lng->txt('pd_enable_pdfrmpostdraft_info'));
188  $cb_prop->setValue(1);
189  $cb_prop->setChecked($ilSetting->get('block_activated_pdfrmpostdraft', 0));
190  $form->addItem($cb_prop);
191  }
192  // Enable block moving
193  $cb_prop = new ilCheckboxInputGUI($lng->txt("pd_enable_block_moving"),
194  "enable_block_moving");
195  $cb_prop->setValue("1");
196  $cb_prop->setInfo($lng->txt("pd_enable_block_moving_info"));
197  $cb_prop->setChecked($enable_block_moving);
198  $form->addItem($cb_prop);
199 
200  // Enable active users block
201 /*
202  $cb_prop = new ilCheckboxInputGUI($lng->txt("pd_enable_active_users"),
203  "block_activated_pdusers");
204  $cb_prop->setValue("1");
205  $cb_prop->setChecked($enable_active_users);
206 
207  // maximum inactivity time
208  $ti_prop = new ilNumberInputGUI($lng->txt("pd_time_before_removal"),
209  "time_removal");
210  $ti_prop->setValue($pd_set->get("user_activity_time"));
211  $ti_prop->setInfo($lng->txt("pd_time_before_removal_info"));
212  $ti_prop->setMaxLength(3);
213  $ti_prop->setSize(3);
214  $cb_prop->addSubItem($ti_prop);
215 
216  $form->addItem($cb_prop);
217 */
218  // Enable 'My Offers' (default personal items)
219  $cb_prop = new ilCheckboxInputGUI($lng->txt('pd_enable_my_offers'), 'enable_my_offers');
220  $cb_prop->setValue('1');
221  $cb_prop->setInfo($lng->txt('pd_enable_my_offers_info'));
222  $cb_prop->setChecked(($ilSetting->get('disable_my_offers') ? '0' : '1'));
223  $form->addItem($cb_prop);
224 
225  // Enable 'My Memberships'
226  $cb_prop = new ilCheckboxInputGUI($lng->txt('pd_enable_my_memberships'), 'enable_my_memberships');
227  $cb_prop->setValue('1');
228  $cb_prop->setInfo($lng->txt('pd_enable_my_memberships_info'));
229  $cb_prop->setChecked(($ilSetting->get('disable_my_memberships') ? '0' : '1'));
230  $form->addItem($cb_prop);
231 
232  if($ilSetting->get('disable_my_offers') == 0 &&
233  $ilSetting->get('disable_my_memberships') == 0)
234  {
235  // Default view of personal items
236  $sb_prop = new ilSelectInputGUI($lng->txt('pd_personal_items_default_view'), 'personal_items_default_view');
237  $sb_prop->setInfo($lng->txt('pd_personal_items_default_view_info'));
238  $option = array();
239  $option[0] = $lng->txt('pd_my_offers');
240  $option[1] = $lng->txt('my_courses_groups');
241  $sb_prop->setOptions($option);
242  $sb_prop->setValue((int)$ilSetting->get('personal_items_default_view'));
243  $form->addItem($sb_prop);
244  }
245 
246  if($ilAccess->checkAccess('write','',$this->object->getRefId()))
247  {
248  // command buttons
249  $form->addCommandButton("saveSettings", $lng->txt("save"));
250  $form->addCommandButton("view", $lng->txt("cancel"));
251  }
252 
253  $this->tpl->setContent($form->getHTML());
254  }
const PD_SYS_MSG_NO_BLOCK
This class represents an option in a radio group.
ILIAS Setting Class.
static _getInstance()
get singleton instance
This class represents a selection list property in a property form.
This class represents a property form user interface.
This class represents a checkbox property in a property form.
global $ilCtrl
Definition: ilias.php:18
setInfo($a_info)
Set Information Text.
const PD_SYS_MSG_OWN_BLOCK
setChecked($a_checked)
Set Checked.
This class represents a property in a property form.
setValue($a_value)
Set Value.
setValue($a_value)
Set Value.
This class represents a text property in a property form.
Create styles array
The data for the language used.
global $ilSetting
Definition: privfeed.php:17
setValue($a_value)
Set Value.
const PD_SYS_MSG_MAIL_BLOCK
+ Here is the call graph for this function:

◆ editWsp()

ilObjPersonalDesktopSettingsGUI::editWsp ( )

Edit personal workspace settings.

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

References $ilCtrl, $ilSetting, ilObjectGUI\$lng, ilAdministrationSettingsFormHandler\addFieldsToForm(), ilAdministrationSettingsFormHandler\FORM_WSP, ilObjDiskQuotaSettings\getInstance(), and ilCheckboxInputGUI\setValue().

324  {
325  global $ilCtrl, $lng, $ilSetting, $ilAccess;
326 
327  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
328  $form = new ilPropertyFormGUI();
329  $form->setFormAction($ilCtrl->getFormAction($this, "saveWsp"));
330  $form->setTitle($lng->txt("pd_personal_workspace"));
331 
332  // Enable 'Personal Workspace'
333  $wsp_prop = new ilCheckboxInputGUI($lng->txt('pd_enable_personal_workspace'), 'wsp');
334  $wsp_prop->setValue('1');
335  $wsp_prop->setChecked(($ilSetting->get('disable_personal_workspace') ? '0' : '1'));
336  $form->addItem($wsp_prop);
337 
338  // Enable 'Blogs'
339  $blog_prop = new ilCheckboxInputGUI($lng->txt('pd_enable_wsp_blogs'), 'blog');
340  $blog_prop->setValue('1');
341  $blog_prop->setChecked(($ilSetting->get('disable_wsp_blogs') ? '0' : '1'));
342  $wsp_prop->addSubItem($blog_prop);
343 
344  // Enable 'Files'
345  $file_prop = new ilCheckboxInputGUI($lng->txt('pd_enable_wsp_files'), 'file');
346  $file_prop->setValue('1');
347  $file_prop->setChecked(($ilSetting->get('disable_wsp_files') ? '0' : '1'));
348  $wsp_prop->addSubItem($file_prop);
349 
350  // Enable 'Certificates'
351  $cert_prop = new ilCheckboxInputGUI($lng->txt('pd_enable_wsp_certificates'), 'cert');
352  $cert_prop->setValue('1');
353  $cert_prop->setChecked(($ilSetting->get('disable_wsp_certificates') ? '0' : '1'));
354  $wsp_prop->addSubItem($cert_prop);
355 
356  // Enable 'Links'
357  $link_prop = new ilCheckboxInputGUI($lng->txt('pd_enable_wsp_links'), 'link');
358  $link_prop->setValue('1');
359  $link_prop->setChecked(($ilSetting->get('disable_wsp_links') ? '0' : '1'));
360  $wsp_prop->addSubItem($link_prop);
361 
362  /*
363  // Enable 'Portfolios'
364  $lng->loadLanguageModule('user');
365  $prtf_prop = new ilCheckboxInputGUI($lng->txt('pd_enable_prtf'), 'prtf');
366  $prtf_prop->setValue('1');
367  $prtf_prop->setInfo($lng->txt('user_portfolios_desc'));
368  $prtf_prop->setChecked(($ilSetting->get('user_portfolios') ? '1' : '0'));
369  $form->addItem($prtf_prop);
370  */
371 
372  // Load the disk quota settings object
373  require_once 'Services/WebDAV/classes/class.ilObjDiskQuotaSettings.php';
374  $disk_quota_obj = ilObjDiskQuotaSettings::getInstance();
375 
376  // Enable disk quota
377  $lng->loadLanguageModule("file");
378  $cb_prop = new ilCheckboxInputGUI($lng->txt("personal_workspace_disk_quota"), "enable_personal_workspace_disk_quota");
379  $cb_prop->setValue('1');
380  $cb_prop->setChecked($disk_quota_obj->isPersonalWorkspaceDiskQuotaEnabled());
381  $cb_prop->setInfo($lng->txt('enable_personal_workspace_disk_quota_info'));
382  $form->addItem($cb_prop);
383 
384  require_once 'Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php';
387  $form,
388  $this
389  );
390 
391  if($ilAccess->checkAccess('write','',$this->object->getRefId()))
392  {
393  // command buttons
394  $form->addCommandButton("saveWsp", $lng->txt("save"));
395  $form->addCommandButton("editWsp", $lng->txt("cancel"));
396  }
397 
398  $this->tpl->setContent($form->getHTML());
399  }
This class represents a property form user interface.
This class represents a checkbox property in a property form.
static addFieldsToForm($a_form_id, ilPropertyFormGUI $a_form, ilObjectGUI $a_parent_gui)
global $ilCtrl
Definition: ilias.php:18
setValue($a_value)
Set Value.
global $ilSetting
Definition: privfeed.php:17
static getInstance()
Get settings instance.
+ Here is the call graph for this function:

◆ executeCommand()

ilObjPersonalDesktopSettingsGUI::executeCommand ( )

Execute command.

public

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

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

41  {
42  global $rbacsystem,$ilErr,$ilAccess;
43 
44  $next_class = $this->ctrl->getNextClass($this);
45  $cmd = $this->ctrl->getCmd();
46 
47  $this->prepareOutput();
48 
49  if(!$ilAccess->checkAccess('read','',$this->object->getRefId()))
50  {
51  $ilErr->raiseError($this->lng->txt('no_permission'),$ilErr->WARNING);
52  }
53 
54  switch($next_class)
55  {
56  case 'ilpermissiongui':
57  $this->tabs_gui->setTabActive('perm_settings');
58  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
59  $perm_gui = new ilPermissionGUI($this);
60  $ret = $this->ctrl->forwardCommand($perm_gui);
61  break;
62 
63  default:
64  if(!$cmd || $cmd == 'view')
65  {
66  $cmd = "editSettings";
67  }
68 
69  $this->$cmd();
70  break;
71  }
72  return true;
73  }
global $ilErr
Definition: raiseError.php:16
$cmd
Definition: sahs_server.php:35
prepareOutput($a_show_subobjects=true)
prepare output
$ret
Definition: parser.php:6
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjPersonalDesktopSettingsGUI::getAdminTabs ( )

Get tabs.

public

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

References array.

82  {
83  global $rbacsystem, $ilAccess;
84 
85  if ($rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
86  {
87  $this->tabs_gui->addTarget("pd_settings",
88  $this->ctrl->getLinkTarget($this, "editSettings"),
89  array("editSettings", "view"));
90 
91  $this->tabs_gui->addTarget("pd_personal_workspace",
92  $this->ctrl->getLinkTarget($this, "editWsp"),
93  array("editWsp"));
94  }
95 
96  if ($rbacsystem->checkAccess('edit_permission',$this->object->getRefId()))
97  {
98  $this->tabs_gui->addTarget("perm_settings",
99  $this->ctrl->getLinkTargetByClass('ilpermissiongui',"perm"),
100  array(),'ilpermissiongui');
101  }
102  }
Create styles array
The data for the language used.

◆ saveSettings()

ilObjPersonalDesktopSettingsGUI::saveSettings ( )

Save personal desktop settings.

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

References $_POST, $ilCtrl, $ilSetting, ilCalendarSettings\_getInstance(), ilUtil\sendFailure(), ilUtil\sendSuccess(), and ilUtil\stripSlashes().

260  {
261  global $ilCtrl, $ilSetting, $ilAccess;
262 
263  if(!$ilAccess->checkAccess('write','',$this->object->getRefId()))
264  {
265  $ilCtrl->redirect($this, "view");
266  }
267 
268  $pd_set = new ilSetting("pd");
269 
270  ilCalendarSettings::_getInstance()->setEnabled( $_POST["enable_calendar"]);
272 
273  #$ilSetting->set("enable_calendar", $_POST["enable_calendar"]);
274  $ilSetting->set("disable_bookmarks", (int) ($_POST["enable_bookmarks"] ? 0 : 1));
275 
276  $ilSetting->set("disable_notes", (int) ($_POST["enable_notes"] ? 0 : 1));
277  $ilSetting->set("disable_comments", (int) ($_POST["enable_comments"] ? 0 : 1));
278 
279  $ilSetting->set("comments_del_user", (int) ($_POST["comm_del_user"] ? 1 : 0));
280  $ilSetting->set("comments_del_tutor", (int) ($_POST["comm_del_tutor"] ? 1 : 0));
281  $ilSetting->set("comments_noti_recip", ilUtil::stripSlashes($_POST["comments_noti_recip"]));
282 
283  $ilSetting->set("block_activated_chatviewer", (int) ($_POST["block_activated_chatviewer"]));
284  $ilSetting->set("pd_sys_msg_mode", (int) ($_POST["pd_sys_msg_mode"]));
285  if($ilSetting->get('save_post_drafts', 0))
286  {
287  $ilSetting->set("block_activated_pdfrmpostdraft", (int)$_POST["block_activated_pdfrmpostdraft"]);
288  }
289 // $ilSetting->set("block_activated_pdusers", $_POST["block_activated_pdusers"]);
290  $pd_set->set("enable_block_moving", $_POST["enable_block_moving"]);
291 // $pd_set->set("user_activity_time", (int) $_POST["time_removal"]);
292 
293  // Validate personal desktop view
294  if(!(int)$_POST['enable_my_offers'] && !(int)$_POST['enable_my_memberships'])
295  {
296  ilUtil::sendFailure($this->lng->txt('pd_view_select_at_least_one'), true);
297  $ilCtrl->redirect($this, 'view');
298  }
299 
300  // Enable 'My Offers' (default personal items)
301  $ilSetting->set('disable_my_offers', (int)($_POST['enable_my_offers'] ? 0 : 1));
302 
303  // Enable 'My Memberships'
304  $ilSetting->set('disable_my_memberships', (int)($_POST['enable_my_memberships'] ? 0 : 1));
305 
306  if((int)$_POST['enable_my_offers'] && !(int)$_POST['enable_my_memberships'])
307  $_POST['personal_items_default_view'] = 0;
308  else if(!(int)$_POST['enable_my_offers'] && (int)$_POST['enable_my_memberships'])
309  $_POST['personal_items_default_view'] = 1;
310  else if(!isset($_POST['personal_items_default_view']))
311  $_POST['personal_items_default_view'] = $ilSetting->get('personal_items_default_view');
312 
313  // Default view of personal items
314  $ilSetting->set('personal_items_default_view', (int)$_POST['personal_items_default_view']);
315 
316  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
317  $ilCtrl->redirect($this, "view");
318  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
ILIAS Setting Class.
static _getInstance()
get singleton instance
global $ilCtrl
Definition: ilias.php:18
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.
global $ilSetting
Definition: privfeed.php:17
$_POST["username"]
+ Here is the call graph for this function:

◆ saveWsp()

ilObjPersonalDesktopSettingsGUI::saveWsp ( )

Save personal desktop settings.

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

References $_POST, $ilCtrl, $ilSetting, ilObjDiskQuotaSettings\getInstance(), and ilUtil\sendSuccess().

405  {
406  global $ilCtrl, $ilSetting, $ilAccess;
407 
408  if(!$ilAccess->checkAccess('write','',$this->object->getRefId()))
409  {
410  $ilCtrl->redirect($this, "view");
411  }
412 
413  // without personal workspace we have to disable to sub-items
414  if(!$_POST["wsp"])
415  {
416  $_POST["blog"] = 0;
417  $_POST["file"] = 0;
418  $_POST["cert"] = 0;
419  $_POST["link"] = 0;
420  }
421 
422  $ilSetting->set('disable_personal_workspace', (int)($_POST['wsp'] ? 0 : 1));
423  $ilSetting->set('disable_wsp_blogs', (int)($_POST['blog'] ? 0 : 1));
424  $ilSetting->set('disable_wsp_files', (int)($_POST['file'] ? 0 : 1));
425  $ilSetting->set('disable_wsp_certificates', (int)($_POST['cert'] ? 0 : 1));
426  $ilSetting->set('disable_wsp_links', (int)($_POST['link'] ? 0 : 1));
427  // $ilSetting->set('user_portfolios', (int)($_POST['prtf'] ? 1 : 0));
428 
429  // Load the disk quota settings object
430  require_once 'Services/WebDAV/classes/class.ilObjDiskQuotaSettings.php';
431  $disk_quota_obj = ilObjDiskQuotaSettings::getInstance();
432  $disk_quota_obj->setPersonalWorkspaceDiskQuotaEnabled($_POST['enable_personal_workspace_disk_quota'] == '1');
433  $disk_quota_obj->update();
434 
435  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
436  $ilCtrl->redirect($this, "editWsp");
437  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
global $ilCtrl
Definition: ilias.php:18
global $ilSetting
Definition: privfeed.php:17
$_POST["username"]
static getInstance()
Get settings instance.
+ Here is the call graph for this function:

Field Documentation

◆ $ERROR_MESSAGE

ilObjPersonalDesktopSettingsGUI::$ERROR_MESSAGE
staticprivate

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


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