ILIAS  release_4-4 Revision
All Data Structures Namespaces Files Functions Variables Modules Pages
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
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public. More...
 
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...
 
 getAdminTabs (&$tabs_gui)
 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 ($in_rep=false)
 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...
 
 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 ()
 
 prepareOutput ()
 prepare output More...
 
 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...
 
 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)
 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...
 
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste More...
 
 getTabs (&$tabs_gui)
 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 ($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

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::ilObjectGUI($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 400 of file class.ilObjPersonalDesktopSettingsGUI.php.

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

401  {
402  switch($a_form_id)
403  {
405 
406  require_once 'Services/WebDAV/classes/class.ilObjDiskQuotaSettings.php';
407  $disk_quota_obj = ilObjDiskQuotaSettings::getInstance();
408 
409  $fields = array('personal_workspace_disk_quota' => array($disk_quota_obj->isPersonalWorkspaceDiskQuotaEnabled(), ilAdministrationSettingsFormHandler::VALUE_BOOL));
410 
411  return array(array("editWsp", $fields));
412  }
413  }
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(), ilFormPropertyGUI\setInfo(), ilTextInputGUI\setValue(), and ilCheckboxInputGUI\setValue().

108  {
109  global $ilCtrl, $lng, $ilSetting;
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 contacts
137  $cb_prop = new ilCheckboxInputGUI($lng->txt("pd_enable_contacts"), "enable_contacts");
138  $cb_prop->setValue("1");
139  $cb_prop->setChecked(($ilSetting->get("disable_contacts") ? "0" : "1"));
140 
141  $cb_prop_requires_mail = new ilCheckboxInputGUI($lng->txt('pd_enable_contacts_requires_mail'), 'enable_contacts_require_mail');
142  $cb_prop_requires_mail->setValue("1");
143  $cb_prop_requires_mail->setChecked(($ilSetting->get("disable_contacts_require_mail") ? "0" : "1"));
144  $cb_prop->addSubItem($cb_prop_requires_mail);
145 
146  $form->addItem($cb_prop);
147 
148  // Enable notes
149  $cb_prop = new ilCheckboxInputGUI($lng->txt("pd_enable_notes"), "enable_notes");
150  $cb_prop->setValue("1");
151  $cb_prop->setChecked(($ilSetting->get("disable_notes") ? "0" : "1"));
152  $form->addItem($cb_prop);
153 
154  // Enable notes
155  $cb_prop = new ilCheckboxInputGUI($lng->txt("pd_enable_comments"), "enable_comments");
156  $cb_prop->setValue("1");
157  $cb_prop->setChecked(($ilSetting->get("disable_comments") ? "0" : "1"));
158  $form->addItem($cb_prop);
159 
160  // Enable Chatviewer
161  $cb_prop = new ilCheckboxInputGUI($lng->txt("pd_enable_chatviewer"), "block_activated_chatviewer");
162  $cb_prop->setValue("1");
163  $cb_prop->setChecked(($ilSetting->get("block_activated_chatviewer")));
164  $form->addItem($cb_prop);
165 
166  // Enable block moving
167  $cb_prop = new ilCheckboxInputGUI($lng->txt("pd_enable_block_moving"),
168  "enable_block_moving");
169  $cb_prop->setValue("1");
170  $cb_prop->setInfo($lng->txt("pd_enable_block_moving_info"));
171  $cb_prop->setChecked($enable_block_moving);
172  $form->addItem($cb_prop);
173 
174  // Enable active users block
175  $cb_prop = new ilCheckboxInputGUI($lng->txt("pd_enable_active_users"),
176  "block_activated_pdusers");
177  $cb_prop->setValue("1");
178  $cb_prop->setChecked($enable_active_users);
179 
180  // maximum inactivity time
181  $ti_prop = new ilTextInputGUI($lng->txt("pd_time_before_removal"),
182  "time_removal");
183  $ti_prop->setValue($pd_set->get("user_activity_time"));
184  $ti_prop->setInfo($lng->txt("pd_time_before_removal_info"));
185  $ti_prop->setMaxLength(3);
186  $ti_prop->setSize(3);
187  $cb_prop->addSubItem($ti_prop);
188 
189  // osi host
190  // see http://www.onlinestatus.org
191  $ti_prop = new ilTextInputGUI($lng->txt("pd_osi_host"),
192  "osi_host");
193  $ti_prop->setValue($pd_set->get("osi_host"));
194  $ti_prop->setInfo($lng->txt("pd_osi_host_info").
195  ' <a href="http://www.onlinestatus.org" target="_blank">http://www.onlinestatus.org</a>');
196  $cb_prop->addSubItem($ti_prop);
197 
198  $form->addItem($cb_prop);
199 
200  // Enable 'My Offers' (default personal items)
201  $cb_prop = new ilCheckboxInputGUI($lng->txt('pd_enable_my_offers'), 'enable_my_offers');
202  $cb_prop->setValue('1');
203  $cb_prop->setInfo($lng->txt('pd_enable_my_offers_info'));
204  $cb_prop->setChecked(($ilSetting->get('disable_my_offers') ? '0' : '1'));
205  $form->addItem($cb_prop);
206 
207  // Enable 'My Memberships'
208  $cb_prop = new ilCheckboxInputGUI($lng->txt('pd_enable_my_memberships'), 'enable_my_memberships');
209  $cb_prop->setValue('1');
210  $cb_prop->setInfo($lng->txt('pd_enable_my_memberships_info'));
211  $cb_prop->setChecked(($ilSetting->get('disable_my_memberships') ? '0' : '1'));
212  $form->addItem($cb_prop);
213 
214  if($ilSetting->get('disable_my_offers') == 0 &&
215  $ilSetting->get('disable_my_memberships') == 0)
216  {
217  // Default view of personal items
218  $sb_prop = new ilSelectInputGUI($lng->txt('pd_personal_items_default_view'), 'personal_items_default_view');
219  $sb_prop->setInfo($lng->txt('pd_personal_items_default_view_info'));
220  $option = array();
221  $option[0] = $lng->txt('pd_my_offers');
222  $option[1] = $lng->txt('my_courses_groups');
223  $sb_prop->setOptions($option);
224  $sb_prop->setValue((int)$ilSetting->get('personal_items_default_view'));
225  $form->addItem($sb_prop);
226  }
227 
228  // command buttons
229  $form->addCommandButton("saveSettings", $lng->txt("save"));
230  $form->addCommandButton("view", $lng->txt("cancel"));
231 
232  $this->tpl->setContent($form->getHTML());
233  }
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.
setValue($a_value)
Set Value.
This class represents a text property in a property form.
global $ilSetting
Definition: privfeed.php:40
setValue($a_value)
Set Value.
+ Here is the call graph for this function:

◆ editWsp()

ilObjPersonalDesktopSettingsGUI::editWsp ( )

Edit personal workspace settings.

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

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

293  {
294  global $ilCtrl, $lng, $ilSetting;
295 
296  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
297  $form = new ilPropertyFormGUI();
298  $form->setFormAction($ilCtrl->getFormAction($this, "saveWsp"));
299  $form->setTitle($lng->txt("pd_personal_workspace"));
300 
301  // Enable 'Personal Workspace'
302  $wsp_prop = new ilCheckboxInputGUI($lng->txt('pd_enable_personal_workspace'), 'wsp');
303  $wsp_prop->setValue('1');
304  $wsp_prop->setChecked(($ilSetting->get('disable_personal_workspace') ? '0' : '1'));
305  $form->addItem($wsp_prop);
306 
307  // Enable 'Blogs'
308  $blog_prop = new ilCheckboxInputGUI($lng->txt('pd_enable_wsp_blogs'), 'blog');
309  $blog_prop->setValue('1');
310  $blog_prop->setChecked(($ilSetting->get('disable_wsp_blogs') ? '0' : '1'));
311  $wsp_prop->addSubItem($blog_prop);
312 
313  // Enable 'Files'
314  $file_prop = new ilCheckboxInputGUI($lng->txt('pd_enable_wsp_files'), 'file');
315  $file_prop->setValue('1');
316  $file_prop->setChecked(($ilSetting->get('disable_wsp_files') ? '0' : '1'));
317  $wsp_prop->addSubItem($file_prop);
318 
319  // Enable 'Certificates'
320  $cert_prop = new ilCheckboxInputGUI($lng->txt('pd_enable_wsp_certificates'), 'cert');
321  $cert_prop->setValue('1');
322  $cert_prop->setChecked(($ilSetting->get('disable_wsp_certificates') ? '0' : '1'));
323  $wsp_prop->addSubItem($cert_prop);
324 
325  // Enable 'Links'
326  $link_prop = new ilCheckboxInputGUI($lng->txt('pd_enable_wsp_links'), 'link');
327  $link_prop->setValue('1');
328  $link_prop->setChecked(($ilSetting->get('disable_wsp_links') ? '0' : '1'));
329  $wsp_prop->addSubItem($link_prop);
330 
331  /*
332  // Enable 'Portfolios'
333  $lng->loadLanguageModule('user');
334  $prtf_prop = new ilCheckboxInputGUI($lng->txt('pd_enable_prtf'), 'prtf');
335  $prtf_prop->setValue('1');
336  $prtf_prop->setInfo($lng->txt('user_portfolios_desc'));
337  $prtf_prop->setChecked(($ilSetting->get('user_portfolios') ? '1' : '0'));
338  $form->addItem($prtf_prop);
339  */
340 
341  // Load the disk quota settings object
342  require_once 'Services/WebDAV/classes/class.ilObjDiskQuotaSettings.php';
343  $disk_quota_obj = ilObjDiskQuotaSettings::getInstance();
344 
345  // Enable disk quota
346  $lng->loadLanguageModule("file");
347  $cb_prop = new ilCheckboxInputGUI($lng->txt("personal_workspace_disk_quota"), "enable_personal_workspace_disk_quota");
348  $cb_prop->setValue('1');
349  $cb_prop->setChecked($disk_quota_obj->isPersonalWorkspaceDiskQuotaEnabled());
350  $cb_prop->setInfo($lng->txt('enable_personal_workspace_disk_quota_info'));
351  $form->addItem($cb_prop);
352 
353  require_once 'Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php';
356  $form,
357  $this
358  );
359 
360  // command buttons
361  $form->addCommandButton("saveWsp", $lng->txt("save"));
362  $form->addCommandButton("editWsp", $lng->txt("cancel"));
363 
364  $this->tpl->setContent($form->getHTML());
365  }
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:40
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  }
$cmd
Definition: sahs_server.php:35
prepareOutput()
prepare output
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.

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  }

◆ saveSettings()

ilObjPersonalDesktopSettingsGUI::saveSettings ( )

Save personal desktop settings.

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

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

239  {
240  global $ilCtrl, $ilSetting;
241 
242  $pd_set = new ilSetting("pd");
243 
244  ilCalendarSettings::_getInstance()->setEnabled( $_POST["enable_calendar"]);
246 
247  #$ilSetting->set("enable_calendar", $_POST["enable_calendar"]);
248  $ilSetting->set("disable_bookmarks", (int) ($_POST["enable_bookmarks"] ? 0 : 1));
249 
250  $ilSetting->set("disable_contacts", (int) ($_POST["enable_contacts"] ? 0 : 1));
251  $ilSetting->set("disable_contacts_require_mail", (int) ($_POST["enable_contacts_require_mail"] ? 0 : 1));
252 
253  $ilSetting->set("disable_notes", (int) ($_POST["enable_notes"] ? 0 : 1));
254  $ilSetting->set("disable_comments", (int) ($_POST["enable_comments"] ? 0 : 1));
255  $ilSetting->set("block_activated_chatviewer", (int) ($_POST["block_activated_chatviewer"]));
256 
257  $ilSetting->set("block_activated_pdusers", $_POST["block_activated_pdusers"]);
258  $pd_set->set("enable_block_moving", $_POST["enable_block_moving"]);
259  $pd_set->set("user_activity_time", (int) $_POST["time_removal"]);
260  $pd_set->set("osi_host", $_POST["osi_host"]);
261 
262  // Validate personal desktop view
263  if(!(int)$_POST['enable_my_offers'] && !(int)$_POST['enable_my_memberships'])
264  {
265  ilUtil::sendFailure($this->lng->txt('pd_view_select_at_least_one'), true);
266  $ilCtrl->redirect($this, 'view');
267  }
268 
269  // Enable 'My Offers' (default personal items)
270  $ilSetting->set('disable_my_offers', (int)($_POST['enable_my_offers'] ? 0 : 1));
271 
272  // Enable 'My Memberships'
273  $ilSetting->set('disable_my_memberships', (int)($_POST['enable_my_memberships'] ? 0 : 1));
274 
275  if((int)$_POST['enable_my_offers'] && !(int)$_POST['enable_my_memberships'])
276  $_POST['personal_items_default_view'] = 0;
277  else if(!(int)$_POST['enable_my_offers'] && (int)$_POST['enable_my_memberships'])
278  $_POST['personal_items_default_view'] = 1;
279  else if(!isset($_POST['personal_items_default_view']))
280  $_POST['personal_items_default_view'] = $ilSetting->get('personal_items_default_view');
281 
282  // Default view of personal items
283  $ilSetting->set('personal_items_default_view', (int)$_POST['personal_items_default_view']);
284 
285  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
286  $ilCtrl->redirect($this, "view");
287  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
ILIAS Setting Class.
static _getInstance()
get singleton instance
$_POST['username']
Definition: cron.php:12
global $ilCtrl
Definition: ilias.php:18
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
global $ilSetting
Definition: privfeed.php:40
+ Here is the call graph for this function:

◆ saveWsp()

ilObjPersonalDesktopSettingsGUI::saveWsp ( )

Save personal desktop settings.

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

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

371  {
372  global $ilCtrl, $ilSetting;
373 
374  // without personal workspace we have to disable to sub-items
375  if(!$_POST["wsp"])
376  {
377  $_POST["blog"] = 0;
378  $_POST["file"] = 0;
379  $_POST["cert"] = 0;
380  $_POST["link"] = 0;
381  }
382 
383  $ilSetting->set('disable_personal_workspace', (int)($_POST['wsp'] ? 0 : 1));
384  $ilSetting->set('disable_wsp_blogs', (int)($_POST['blog'] ? 0 : 1));
385  $ilSetting->set('disable_wsp_files', (int)($_POST['file'] ? 0 : 1));
386  $ilSetting->set('disable_wsp_certificates', (int)($_POST['cert'] ? 0 : 1));
387  $ilSetting->set('disable_wsp_links', (int)($_POST['link'] ? 0 : 1));
388  // $ilSetting->set('user_portfolios', (int)($_POST['prtf'] ? 1 : 0));
389 
390  // Load the disk quota settings object
391  require_once 'Services/WebDAV/classes/class.ilObjDiskQuotaSettings.php';
392  $disk_quota_obj = ilObjDiskQuotaSettings::getInstance();
393  $disk_quota_obj->setPersonalWorkspaceDiskQuotaEnabled($_POST['enable_personal_workspace_disk_quota'] == '1');
394  $disk_quota_obj->update();
395 
396  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
397  $ilCtrl->redirect($this, "editWsp");
398  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
global $ilCtrl
Definition: ilias.php:18
global $ilSetting
Definition: privfeed.php:40
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: