3include_once(
"./Services/Object/classes/class.ilObjectGUI.php");
 
    4include_once(
'./Services/Calendar/classes/class.ilCalendarSettings.php');
 
    5require_once 
'Services/PersonalDesktop/ItemsBlock/classes/class.ilPDSelectedItemsBlockViewSettings.php';
 
   40    public function __construct($a_data, $a_id, $a_call_by_reference = 
true, $a_prepare_output = 
true)
 
   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();
 
   51        $this->ui_factory = 
$DIC->ui()->factory();
 
   52        $this->ui_renderer = 
$DIC->ui()->renderer();
 
   55        parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
 
   57        $lng->loadLanguageModule(
"pd");
 
   74        $next_class = $this->ctrl->getNextClass($this);
 
   75        $cmd = $this->ctrl->getCmd();
 
   79        if (!$ilAccess->checkAccess(
'read', 
'', $this->object->getRefId())) {
 
   80            $ilErr->raiseError($this->lng->txt(
'no_permission'), 
$ilErr->WARNING);
 
   83        switch ($next_class) {
 
   84            case 'ilpermissiongui':
 
   85                $this->tabs_gui->setTabActive(
'perm_settings');
 
   86                include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
 
   88                $ret = $this->ctrl->forwardCommand($perm_gui);
 
   92                if (!$cmd || $cmd == 
'view') {
 
   93                    $cmd = 
"editSettings";
 
  113        if (
$rbacsystem->checkAccess(
"visible,read", $this->object->getRefId())) {
 
  114            $this->tabs_gui->addTarget(
 
  116                $this->ctrl->getLinkTarget($this, 
"editSettings"),
 
  117                array(
"editSettings", 
"view")
 
  120            $this->tabs_gui->addTarget(
 
  121                "pd_personal_workspace",
 
  122                $this->ctrl->getLinkTarget($this, 
"editWsp"),
 
  127        if (
$rbacsystem->checkAccess(
'edit_permission', $this->object->getRefId())) {
 
  128            $this->tabs_gui->addTarget(
 
  130                $this->ctrl->getLinkTargetByClass(
'ilpermissiongui', 
"perm"),
 
  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");
 
  154        include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
 
  157        $form->setTitle(
$lng->txt(
"pd_settings"));
 
  161        $cb_prop->setValue(
"1");
 
  163        $cb_prop->setChecked($enable_calendar);
 
  164        $form->addItem($cb_prop);
 
  168        $cb_prop->setValue(
"1");
 
  169        $cb_prop->setChecked((
$ilSetting->get(
"disable_bookmarks") ? 
"0" : 
"1"));
 
  170        $form->addItem($cb_prop);
 
  174        $cb_prop->setValue(
"1");
 
  175        $cb_prop->setChecked((
$ilSetting->get(
"disable_notes") ? 
"0" : 
"1"));
 
  176        $form->addItem($cb_prop);
 
  180        $cb_prop->setValue(
"1");
 
  181        $cb_prop->setChecked((
$ilSetting->get(
"disable_comments") ? 
"0" : 
"1"));
 
  182        $form->addItem($cb_prop);
 
  185        $comm_del_user->setChecked(
$ilSetting->get(
"comments_del_user", 0));
 
  186        $cb_prop->addSubItem($comm_del_user);
 
  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);
 
  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);
 
  201        $cb_prop->setValue(
"1");
 
  202        $cb_prop->setChecked((
$ilSetting->get(
"block_activated_chatviewer")));
 
  203        $form->addItem($cb_prop);
 
  205        require_once 
'Services/Mail/classes/class.ilObjMail.php';
 
  209        $pd_sys_msg->addOption($sys_msg_own_block);
 
  212        $pd_sys_msg->addOption($sys_msg_mail_block);
 
  215        $pd_sys_msg->addOption($sys_msg_own_block);
 
  217        $pd_sys_msg->setValue((
int) (
$ilSetting->get(
'pd_sys_msg_mode')));
 
  218        $form->addItem($pd_sys_msg);
 
  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);
 
  229            $lng->txt(
"pd_enable_block_moving"),
 
  230            "enable_block_moving" 
  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);
 
  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);
 
  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);
 
  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);
 
  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']);
 
  282        $lng->loadLanguageModule(
"user");
 
  283        $starting_point_button = $this->ui_factory->button()->shy(
$lng->txt(
"starting_points"), 
$url);
 
  285        $button->setHtml($this->ui_renderer->render($starting_point_button));
 
  286        $form->addItem($button);
 
  288        if ($ilAccess->checkAccess(
'write', 
'', $this->object->getRefId())) {
 
  290            $form->addCommandButton(
"saveSettings", 
$lng->txt(
"save"));
 
  291            $form->addCommandButton(
"view", 
$lng->txt(
"cancel"));
 
  294        $this->tpl->setContent(
$form->getHTML());
 
  306        if (!$ilAccess->checkAccess(
'write', 
'', $this->object->getRefId())) {
 
  307            $ilCtrl->redirect($this, 
"view");
 
  315        #$ilSetting->set("enable_calendar", $_POST["enable_calendar"]);
 
  316        $ilSetting->set(
"disable_bookmarks", (
int) (
$_POST[
"enable_bookmarks"] ? 0 : 1));
 
  319        $ilSetting->set(
"disable_comments", (
int) (
$_POST[
"enable_comments"] ? 0 : 1));
 
  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));
 
  325        $ilSetting->set(
"block_activated_chatviewer", (
int) (
$_POST[
"block_activated_chatviewer"]));
 
  328            $ilSetting->set(
"block_activated_pdfrmpostdraft", (
int) 
$_POST[
"block_activated_pdfrmpostdraft"]);
 
  331        $pd_set->set(
"enable_block_moving", 
$_POST[
"enable_block_moving"]);
 
  335        if (!(
int) 
$_POST[
'enable_my_offers'] && !(
int) 
$_POST[
'enable_my_memberships']) {
 
  337            $ilCtrl->redirect($this, 
'view');
 
  340        $this->viewSettings->enableSelectedItems((
int) (
$_POST[
'enable_my_offers'] ? 1 : 0));
 
  341        $this->viewSettings->enableMemberships((
int) (
$_POST[
'enable_my_memberships'] ? 1 : 0));
 
  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']);
 
  354        $ilCtrl->redirect($this, 
"view");
 
  367        include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
 
  369        $form->setFormAction(
$ilCtrl->getFormAction($this, 
"saveWsp"));
 
  370        $form->setTitle(
$lng->txt(
"pd_personal_workspace"));
 
  374        $wsp_prop->setValue(
'1');
 
  375        $wsp_prop->setChecked((
$ilSetting->get(
'disable_personal_workspace') ? 
'0' : 
'1'));
 
  376        $form->addItem($wsp_prop);
 
  380        $blog_prop->setValue(
'1');
 
  381        $blog_prop->setChecked((
$ilSetting->get(
'disable_wsp_blogs') ? 
'0' : 
'1'));
 
  382        $wsp_prop->addSubItem($blog_prop);
 
  386        $file_prop->setValue(
'1');
 
  387        $file_prop->setChecked((
$ilSetting->get(
'disable_wsp_files') ? 
'0' : 
'1'));
 
  388        $wsp_prop->addSubItem($file_prop);
 
  392        $cert_prop->setValue(
'1');
 
  393        $cert_prop->setChecked((
$ilSetting->get(
'disable_wsp_certificates') ? 
'0' : 
'1'));
 
  394        $wsp_prop->addSubItem($cert_prop);
 
  398        $link_prop->setValue(
'1');
 
  399        $link_prop->setChecked((
$ilSetting->get(
'disable_wsp_links') ? 
'0' : 
'1'));
 
  400        $wsp_prop->addSubItem($link_prop);
 
  413        require_once 
'Services/WebDAV/classes/class.ilObjDiskQuotaSettings.php';
 
  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);
 
  424        require_once 
'Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php';
 
  431        if ($ilAccess->checkAccess(
'write', 
'', $this->object->getRefId())) {
 
  433            $form->addCommandButton(
"saveWsp", 
$lng->txt(
"save"));
 
  434            $form->addCommandButton(
"editWsp", 
$lng->txt(
"cancel"));
 
  437        $this->tpl->setContent(
$form->getHTML());
 
  449        if (!$ilAccess->checkAccess(
'write', 
'', $this->object->getRefId())) {
 
  450            $ilCtrl->redirect($this, 
"view");
 
  461        $ilSetting->set(
'disable_personal_workspace', (
int) (
$_POST[
'wsp'] ? 0 : 1));
 
  464        $ilSetting->set(
'disable_wsp_certificates', (
int) (
$_POST[
'cert'] ? 0 : 1));
 
  469        require_once 
'Services/WebDAV/classes/class.ilObjDiskQuotaSettings.php';
 
  471        $disk_quota_obj->setPersonalWorkspaceDiskQuotaEnabled(
$_POST[
'enable_personal_workspace_disk_quota'] == 
'1');
 
  472        $disk_quota_obj->update();
 
  475        $ilCtrl->redirect($this, 
"editWsp");
 
  480        switch ($a_form_id) {
 
  483                require_once 
'Services/WebDAV/classes/class.ilObjDiskQuotaSettings.php';
 
  488                return array(array(
"editWsp", $fields));
 
An exception for terminatinating execution or to throw for unit testing.
error($a_errmsg)
set error message @access public
const USER_FOLDER_ID
Class ilObjUserFolder.
static _getInstance()
get singleton instance
static getInstance()
Get settings instance.
const PD_SYS_MSG_OWN_BLOCK
const PD_SYS_MSG_NO_BLOCK
const PD_SYS_MSG_MAIL_BLOCK
editSettings()
Edit personal desktop settings.
editWsp()
Edit personal workspace settings.
saveSettings()
Save personal desktop settings.
addToExternalSettingsForm($a_form_id)
__construct($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
Contructor.
saveWsp()
Save personal desktop settings.
executeCommand()
Execute command.
Class ilObjectGUI Basic methods of all Output classes.
prepareOutput($a_show_subobjects=true)
prepare output
Class ilPDSelectedItemsBlockViewSettings.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
This class represents an option in a radio group.
This class represents a text property in a property form.
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
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
if(isset($_POST['submit'])) $form