ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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...
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html. More...
 

Protected Attributes

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

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
 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...
 
 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['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
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 467 of file class.ilObjPersonalDesktopSettingsGUI.php.

468 {
469 switch ($a_form_id) {
471
472 require_once 'Services/WebDAV/classes/class.ilObjDiskQuotaSettings.php';
473 $disk_quota_obj = ilObjDiskQuotaSettings::getInstance();
474
475 $fields = array('personal_workspace_disk_quota' => array($disk_quota_obj->isPersonalWorkspaceDiskQuotaEnabled(), ilAdministrationSettingsFormHandler::VALUE_BOOL));
476
477 return array(array("editWsp", $fields));
478 }
479 }
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
153 include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
154 $form = new ilPropertyFormGUI();
155 $form->setFormAction($ilCtrl->getFormAction($this));
156 $form->setTitle($lng->txt("pd_settings"));
157
158 // Enable calendar
159 $cb_prop = new ilCheckboxInputGUI($lng->txt("enable_calendar"), "enable_calendar");
160 $cb_prop->setValue("1");
161 //$cb_prop->setInfo($lng->txt("pd_enable_block_moving_info"));
162 $cb_prop->setChecked($enable_calendar);
163 $form->addItem($cb_prop);
164
165 // Enable bookmarks
166 $cb_prop = new ilCheckboxInputGUI($lng->txt("pd_enable_bookmarks"), "enable_bookmarks");
167 $cb_prop->setValue("1");
168 $cb_prop->setChecked(($ilSetting->get("disable_bookmarks") ? "0" : "1"));
169 $form->addItem($cb_prop);
170
171 // Enable notes
172 $cb_prop = new ilCheckboxInputGUI($lng->txt("pd_enable_notes"), "enable_notes");
173 $cb_prop->setValue("1");
174 $cb_prop->setChecked(($ilSetting->get("disable_notes") ? "0" : "1"));
175 $form->addItem($cb_prop);
176
177 // Enable comments
178 $cb_prop = new ilCheckboxInputGUI($lng->txt("pd_enable_comments"), "enable_comments");
179 $cb_prop->setValue("1");
180 $cb_prop->setChecked(($ilSetting->get("disable_comments") ? "0" : "1"));
181 $form->addItem($cb_prop);
182
183 $comm_del_user = new ilCheckboxInputGUI($lng->txt("pd_enable_comments_del_user"), "comm_del_user");
184 $comm_del_user->setChecked($ilSetting->get("comments_del_user", 0));
185 $cb_prop->addSubItem($comm_del_user);
186
187 $comm_del_tutor = new ilCheckboxInputGUI($lng->txt("pd_enable_comments_del_tutor"), "comm_del_tutor");
188 $comm_del_tutor->setInfo($lng->txt("pd_enable_comments_del_tutor_info"));
189 $comm_del_tutor->setChecked($ilSetting->get("comments_del_tutor", 1));
190 $cb_prop->addSubItem($comm_del_tutor);
191
192 $ti = new ilTextInputGUI($this->lng->txt("pd_comments_notification"), "comments_noti_recip");
193 $ti->setValue($ilSetting->get("comments_noti_recip"));
194 $ti->setMaxLength(200);
195 $ti->setInfo($this->lng->txt("pd_comments_notification_info"));
196 $cb_prop->addSubItem($ti);
197
198 // Enable learning history
199 $learn_hist = new ilCheckboxInputGUI($lng->txt("pd_enable_learning_history"), "enable_learning_history");
200 $learn_hist->setValue("1");
201 $learn_hist->setInfo($lng->txt("pd_enable_learning_history_info"));
202 $learn_hist->setChecked(($ilSetting->get("enable_learning_history") ? "1" : "0"));
203 $form->addItem($learn_hist);
204
205 // Enable Chatviewer
206 $cb_prop = new ilCheckboxInputGUI($lng->txt("pd_enable_chatviewer"), "block_activated_chatviewer");
207 $cb_prop->setValue("1");
208 $cb_prop->setChecked(($ilSetting->get("block_activated_chatviewer")));
209 $form->addItem($cb_prop);
210
211 require_once 'Services/Mail/classes/class.ilObjMail.php';
212 $pd_sys_msg = new ilRadioGroupInputGUI($lng->txt('show_system_messages'), 'pd_sys_msg_mode');
213
214 $sys_msg_own_block = new ilRadioOption($lng->txt('pd_sys_msg_own_block'), ilObjMail::PD_SYS_MSG_OWN_BLOCK);
215 $pd_sys_msg->addOption($sys_msg_own_block);
216
217 $sys_msg_mail_block = new ilRadioOption($lng->txt('pd_sys_msg_mail_block'), ilObjMail::PD_SYS_MSG_MAIL_BLOCK);
218 $pd_sys_msg->addOption($sys_msg_mail_block);
219
220 $sys_msg_own_block = new ilRadioOption($lng->txt('pd_sys_msg_no_block'), ilObjMail::PD_SYS_MSG_NO_BLOCK);
221 $pd_sys_msg->addOption($sys_msg_own_block);
222
223 $pd_sys_msg->setValue((int) ($ilSetting->get('pd_sys_msg_mode')));
224 $form->addItem($pd_sys_msg);
225
226 if ($ilSetting->get('save_post_drafts', 0)) {
227 $cb_prop = new ilCheckboxInputGUI($lng->txt('pd_enable_pdfrmpostdraft'), 'block_activated_pdfrmpostdraft');
228 $cb_prop->setInfo($lng->txt('pd_enable_pdfrmpostdraft_info'));
229 $cb_prop->setValue(1);
230 $cb_prop->setChecked($ilSetting->get('block_activated_pdfrmpostdraft', 0));
231 $form->addItem($cb_prop);
232 }
233 // Enable block moving
234 $cb_prop = new ilCheckboxInputGUI(
235 $lng->txt("pd_enable_block_moving"),
236 "enable_block_moving"
237 );
238 $cb_prop->setValue("1");
239 $cb_prop->setInfo($lng->txt("pd_enable_block_moving_info"));
240 $cb_prop->setChecked($enable_block_moving);
241 $form->addItem($cb_prop);
242
243 // Enable 'My Offers' (default personal items)
244 $cb_prop = new ilCheckboxInputGUI($lng->txt('pd_enable_my_offers'), 'enable_my_offers');
245 $cb_prop->setValue('1');
246 $cb_prop->setInfo($lng->txt('pd_enable_my_offers_info'));
247 $cb_prop->setChecked($this->viewSettings->enabledSelectedItems());
248 $form->addItem($cb_prop);
249
250 // Enable 'My Memberships'
251 $cb_prop = new ilCheckboxInputGUI($lng->txt('pd_enable_my_memberships'), 'enable_my_memberships');
252 $cb_prop->setValue('1');
253 $cb_prop->setInfo($lng->txt('pd_enable_my_memberships_info'));
254 $cb_prop->setChecked($this->viewSettings->enabledMemberships());
255 $form->addItem($cb_prop);
256
257 $memberships_sort_defaults = new ilRadioGroupInputGUI($lng->txt('pd_my_memberships_sort_default'), 'my_memberships_sort_default');
258 $memberships_sort_defaults->addOption(new ilRadioOption($lng->txt('pd_sort_by_location'), $this->viewSettings->getSortByLocationMode()));
259 $memberships_sort_defaults->addOption(new ilRadioOption($lng->txt('pd_sort_by_type'), $this->viewSettings->getSortByTypeMode()));
260 $memberships_sort_defaults->addOption(new ilRadioOption($lng->txt('pd_sort_by_start_date'), $this->viewSettings->getSortByStartDateMode()));
261 $memberships_sort_defaults->setRequired(true);
262 $memberships_sort_defaults->setValue($this->viewSettings->getDefaultSortType());
263 $cb_prop->addSubItem($memberships_sort_defaults);
264
265 #22357
266 $this->ctrl->setParameterByClass("iluserstartingpointgui", "ref_id", USER_FOLDER_ID);
267 $url = $this->ctrl->getLinkTargetByClass(array("iladministrationgui","ilobjuserfoldergui", "iluserstartingpointgui"), "startingpoints");
268 $this->ctrl->setParameterByClass("iluserstartingpointgui", "ref_id", $_GET['ref_id']);
269
270 $lng->loadLanguageModule("user");
271 $starting_point_button = $this->ui_factory->button()->shy($lng->txt("starting_points"), $url);
272 $button = new ilCustomInputGUI($lng->txt('pd_personal_items_default_view'), '');
273 $button->setHtml($this->ui_renderer->render($starting_point_button));
274 $form->addItem($button);
275
276 if ($ilAccess->checkAccess('write', '', $this->object->getRefId())) {
277 // command buttons
278 $form->addCommandButton("saveSettings", $lng->txt("save"));
279 $form->addCommandButton("view", $lng->txt("cancel"));
280 }
281
282 $this->tpl->setContent($form->getHTML());
283 }
$_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 349 of file class.ilObjPersonalDesktopSettingsGUI.php.

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

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

+ Here is the call graph for this function:

◆ saveWsp()

ilObjPersonalDesktopSettingsGUI::saveWsp ( )

Save personal desktop settings.

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

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

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

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