3include_once(
"./Services/Object/classes/class.ilObjectGUI.php");
 
    4include_once(
'./Services/Calendar/classes/class.ilCalendarSettings.php');
 
   24        public function __construct($a_data, $a_id, $a_call_by_reference = 
true, $a_prepare_output = 
true)
 
   29                parent::ilObjectGUI($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
 
   31                $lng->loadLanguageModule(
"pd");
 
   42                global $rbacsystem,
$ilErr,$ilAccess;
 
   44                $next_class = $this->ctrl->getNextClass($this);
 
   45                $cmd = $this->ctrl->getCmd();
 
   49                if(!$ilAccess->checkAccess(
'read',
'',$this->object->getRefId()))
 
   51                        $ilErr->raiseError($this->lng->txt(
'no_permission'),
$ilErr->WARNING);
 
   56                        case 'ilpermissiongui':
 
   57                                $this->tabs_gui->setTabActive(
'perm_settings');
 
   58                                include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
 
   60                                $ret =& $this->ctrl->forwardCommand($perm_gui);
 
   66                                        $cmd = 
"editSettings";
 
   83                global $rbacsystem, $ilAccess;
 
   85                if ($rbacsystem->checkAccess(
"visible,read",$this->object->getRefId()))
 
   87                        $this->tabs_gui->addTarget(
"pd_settings",
 
   88                                $this->ctrl->getLinkTarget($this, 
"editSettings"),
 
   89                                array(
"editSettings", 
"view"));
 
   91                        $this->tabs_gui->addTarget(
"pd_personal_workspace",
 
   92                                $this->ctrl->getLinkTarget($this, 
"editWsp"),
 
   96                if ($rbacsystem->checkAccess(
'edit_permission',$this->object->getRefId()))
 
   98                        $this->tabs_gui->addTarget(
"perm_settings",
 
   99                                $this->ctrl->getLinkTargetByClass(
'ilpermissiongui',
"perm"),
 
  100                                array(),
'ilpermissiongui');
 
  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");              
 
  118                include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
 
  120                $form->setFormAction(
$ilCtrl->getFormAction($this));
 
  121                $form->setTitle(
$lng->txt(
"pd_settings"));
 
  125                $cb_prop->setValue(
"1");
 
  127                $cb_prop->setChecked($enable_calendar);
 
  128                $form->addItem($cb_prop);
 
  132                $cb_prop->setValue(
"1");
 
  133                $cb_prop->setChecked((
$ilSetting->get(
"disable_bookmarks") ? 
"0" : 
"1"));
 
  134                $form->addItem($cb_prop);
 
  138                $cb_prop->setValue(
"1");
 
  139                $cb_prop->setChecked((
$ilSetting->get(
"disable_notes") ? 
"0" : 
"1"));
 
  140                $form->addItem($cb_prop);
 
  144                $cb_prop->setValue(
"1");
 
  145                $cb_prop->setChecked((
$ilSetting->get(
"disable_comments") ? 
"0" : 
"1"));
 
  146                $form->addItem($cb_prop);
 
  149                $comm_del_user->setChecked(
$ilSetting->get(
"comments_del_user", 0));
 
  150                $cb_prop->addSubItem($comm_del_user);           
 
  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);
 
  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);
 
  165                $cb_prop->setValue(
"1");
 
  166                $cb_prop->setChecked((
$ilSetting->get(
"block_activated_chatviewer")));
 
  167                $form->addItem($cb_prop);
 
  171                        "enable_block_moving");
 
  172                $cb_prop->setValue(
"1");
 
  173                $cb_prop->setInfo(
$lng->txt(
"pd_enable_block_moving_info"));
 
  174                $cb_prop->setChecked($enable_block_moving);
 
  175                $form->addItem($cb_prop);               
 
  206                $cb_prop->setValue(
'1');
 
  207                $cb_prop->setInfo(
$lng->txt(
'pd_enable_my_offers_info'));
 
  208                $cb_prop->setChecked((
$ilSetting->get(
'disable_my_offers') ? 
'0' : 
'1'));
 
  209                $form->addItem($cb_prop);
 
  213                $cb_prop->setValue(
'1');
 
  214                $cb_prop->setInfo(
$lng->txt(
'pd_enable_my_memberships_info'));
 
  215                $cb_prop->setChecked((
$ilSetting->get(
'disable_my_memberships') ? 
'0' : 
'1'));
 
  216                $form->addItem($cb_prop);
 
  218                if(
$ilSetting->get(
'disable_my_offers') == 0 &&
 
  219                   $ilSetting->get(
'disable_my_memberships') == 0)
 
  222                        $sb_prop = 
new ilSelectInputGUI(
$lng->txt(
'pd_personal_items_default_view'), 
'personal_items_default_view');
 
  223                        $sb_prop->setInfo(
$lng->txt(
'pd_personal_items_default_view_info'));
 
  225                        $option[0] = 
$lng->txt(
'pd_my_offers');
 
  226                        $option[1] = 
$lng->txt(
'my_courses_groups');
 
  227                        $sb_prop->setOptions($option);
 
  228                        $sb_prop->setValue((
int)
$ilSetting->get(
'personal_items_default_view'));
 
  229                        $form->addItem($sb_prop);
 
  232                if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
 
  235                        $form->addCommandButton(
"saveSettings", 
$lng->txt(
"save"));
 
  236                        $form->addCommandButton(
"view", 
$lng->txt(
"cancel"));
 
  239                $this->tpl->setContent($form->getHTML());
 
  249                if(!$ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
 
  251                        $ilCtrl->redirect($this, 
"view");
 
  259                #$ilSetting->set("enable_calendar", $_POST["enable_calendar"]);
 
  260                $ilSetting->set(
"disable_bookmarks", (
int) (
$_POST[
"enable_bookmarks"] ? 0 : 1));
 
  263                $ilSetting->set(
"disable_comments", (
int) (
$_POST[
"enable_comments"] ? 0 : 1));
 
  265                $ilSetting->set(
"comments_del_user", (
int) (
$_POST[
"comm_del_user"] ? 1 : 0));
 
  266                $ilSetting->set(
"comments_del_tutor", (
int) (
$_POST[
"comm_del_tutor"] ? 1 : 0));
 
  269                $ilSetting->set(
"block_activated_chatviewer", (
int) (
$_POST[
"block_activated_chatviewer"]));            
 
  272                $pd_set->set(
"enable_block_moving", 
$_POST[
"enable_block_moving"]);
 
  277                if(!(
int)
$_POST[
'enable_my_offers'] && !(
int)
$_POST[
'enable_my_memberships'])
 
  280                        $ilCtrl->redirect($this, 
'view');
 
  284                $ilSetting->set(
'disable_my_offers', (
int)(
$_POST[
'enable_my_offers'] ? 0 : 1));
 
  287                $ilSetting->set(
'disable_my_memberships', (
int)(
$_POST[
'enable_my_memberships'] ? 0 : 1));
 
  289                if((
int)
$_POST[
'enable_my_offers'] && !(
int)
$_POST[
'enable_my_memberships'])
 
  290                        $_POST[
'personal_items_default_view'] = 0;
 
  291                else if(!(
int)
$_POST[
'enable_my_offers'] && (
int)
$_POST[
'enable_my_memberships'])
 
  292                        $_POST[
'personal_items_default_view'] = 1;
 
  293                else if(!isset(
$_POST[
'personal_items_default_view']))
 
  294                        $_POST[
'personal_items_default_view'] = 
$ilSetting->get(
'personal_items_default_view');
 
  297                $ilSetting->set(
'personal_items_default_view', (
int)
$_POST[
'personal_items_default_view']);
 
  300                $ilCtrl->redirect($this, 
"view");
 
  310                include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
 
  312                $form->setFormAction(
$ilCtrl->getFormAction($this, 
"saveWsp"));
 
  313                $form->setTitle(
$lng->txt(
"pd_personal_workspace"));
 
  317                $wsp_prop->setValue(
'1');
 
  318                $wsp_prop->setChecked((
$ilSetting->get(
'disable_personal_workspace') ? 
'0' : 
'1'));
 
  319                $form->addItem($wsp_prop);
 
  323                $blog_prop->setValue(
'1');
 
  324                $blog_prop->setChecked((
$ilSetting->get(
'disable_wsp_blogs') ? 
'0' : 
'1'));
 
  325                $wsp_prop->addSubItem($blog_prop);
 
  329                $file_prop->setValue(
'1');
 
  330                $file_prop->setChecked((
$ilSetting->get(
'disable_wsp_files') ? 
'0' : 
'1'));
 
  331                $wsp_prop->addSubItem($file_prop);
 
  335                $cert_prop->setValue(
'1');
 
  336                $cert_prop->setChecked((
$ilSetting->get(
'disable_wsp_certificates') ? 
'0' : 
'1'));
 
  337                $wsp_prop->addSubItem($cert_prop);
 
  341                $link_prop->setValue(
'1');
 
  342                $link_prop->setChecked((
$ilSetting->get(
'disable_wsp_links') ? 
'0' : 
'1'));
 
  343                $wsp_prop->addSubItem($link_prop);                      
 
  356                require_once 
'Services/WebDAV/classes/class.ilObjDiskQuotaSettings.php';
 
  360                $lng->loadLanguageModule(
"file");
 
  361                $cb_prop = 
new ilCheckboxInputGUI(
$lng->txt(
"personal_workspace_disk_quota"), 
"enable_personal_workspace_disk_quota");
 
  362                $cb_prop->setValue(
'1');
 
  363                $cb_prop->setChecked($disk_quota_obj->isPersonalWorkspaceDiskQuotaEnabled());
 
  364                $cb_prop->setInfo(
$lng->txt(
'enable_personal_workspace_disk_quota_info'));
 
  365                $form->addItem($cb_prop);
 
  367                require_once 
'Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php';
 
  374                if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
 
  377                        $form->addCommandButton(
"saveWsp", 
$lng->txt(
"save"));
 
  378                        $form->addCommandButton(
"editWsp", 
$lng->txt(
"cancel"));
 
  381                $this->tpl->setContent($form->getHTML());
 
  391                if(!$ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
 
  393                        $ilCtrl->redirect($this, 
"view");
 
  405                $ilSetting->set(
'disable_personal_workspace', (
int)(
$_POST[
'wsp'] ? 0 : 1));
 
  413                require_once 
'Services/WebDAV/classes/class.ilObjDiskQuotaSettings.php';
 
  415                $disk_quota_obj->setPersonalWorkspaceDiskQuotaEnabled(
$_POST[
'enable_personal_workspace_disk_quota'] == 
'1');
 
  416                $disk_quota_obj->update();
 
  419                $ilCtrl->redirect($this, 
"editWsp");
 
  428                                require_once 
'Services/WebDAV/classes/class.ilObjDiskQuotaSettings.php';
 
  433                                return array(array(
"editWsp", $fields));                        
 
static _getInstance()
get singleton instance
static getInstance()
Get settings instance.
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()
prepare output
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
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