3 include_once(
"./Services/Object/classes/class.ilObjectGUI.php");
4 include_once(
'./Services/Calendar/classes/class.ilCalendarSettings.php');
24 public function __construct($a_data, $a_id, $a_call_by_reference =
true, $a_prepare_output =
true)
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"));
127 $cb_prop->setChecked($enable_calendar);
128 $form->addItem($cb_prop);
131 $cb_prop =
new ilCheckboxInputGUI($lng->txt(
"pd_enable_bookmarks"),
"enable_bookmarks");
133 $cb_prop->setChecked(($ilSetting->get(
"disable_bookmarks") ?
"0" :
"1"));
134 $form->addItem($cb_prop);
137 $cb_prop =
new ilCheckboxInputGUI($lng->txt(
"pd_enable_contacts"),
"enable_contacts");
139 $cb_prop->setChecked(($ilSetting->get(
"disable_contacts") ?
"0" :
"1"));
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);
146 $form->addItem($cb_prop);
151 $cb_prop->setChecked(($ilSetting->get(
"disable_notes") ?
"0" :
"1"));
152 $form->addItem($cb_prop);
155 $cb_prop =
new ilCheckboxInputGUI($lng->txt(
"pd_enable_comments"),
"enable_comments");
157 $cb_prop->setChecked(($ilSetting->get(
"disable_comments") ?
"0" :
"1"));
158 $form->addItem($cb_prop);
161 $cb_prop =
new ilCheckboxInputGUI($lng->txt(
"pd_enable_chatviewer"),
"block_activated_chatviewer");
163 $cb_prop->setChecked(($ilSetting->get(
"block_activated_chatviewer")));
164 $form->addItem($cb_prop);
168 "enable_block_moving");
170 $cb_prop->setInfo($lng->txt(
"pd_enable_block_moving_info"));
171 $cb_prop->setChecked($enable_block_moving);
172 $form->addItem($cb_prop);
176 "block_activated_pdusers");
178 $cb_prop->setChecked($enable_active_users);
181 $ti_prop =
new ilTextInputGUI($lng->txt(
"pd_time_before_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);
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);
198 $form->addItem($cb_prop);
201 $cb_prop =
new ilCheckboxInputGUI($lng->txt(
'pd_enable_my_offers'),
'enable_my_offers');
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);
208 $cb_prop =
new ilCheckboxInputGUI($lng->txt(
'pd_enable_my_memberships'),
'enable_my_memberships');
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);
214 if($ilSetting->get(
'disable_my_offers') == 0 &&
215 $ilSetting->get(
'disable_my_memberships') == 0)
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'));
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);
229 $form->addCommandButton(
"saveSettings", $lng->txt(
"save"));
230 $form->addCommandButton(
"view", $lng->txt(
"cancel"));
232 $this->tpl->setContent($form->getHTML());
247 #$ilSetting->set("enable_calendar", $_POST["enable_calendar"]);
248 $ilSetting->set(
"disable_bookmarks", (
int) (
$_POST[
"enable_bookmarks"] ? 0 : 1));
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));
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"]));
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"]);
263 if(!(
int)$_POST[
'enable_my_offers'] && !(
int)$_POST[
'enable_my_memberships'])
266 $ilCtrl->redirect($this,
'view');
270 $ilSetting->set(
'disable_my_offers', (
int)($_POST[
'enable_my_offers'] ? 0 : 1));
273 $ilSetting->set(
'disable_my_memberships', (
int)($_POST[
'enable_my_memberships'] ? 0 : 1));
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');
283 $ilSetting->set(
'personal_items_default_view', (
int)$_POST[
'personal_items_default_view']);
286 $ilCtrl->redirect($this,
"view");
296 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
298 $form->setFormAction($ilCtrl->getFormAction($this,
"saveWsp"));
299 $form->setTitle($lng->txt(
"pd_personal_workspace"));
304 $wsp_prop->setChecked(($ilSetting->get(
'disable_personal_workspace') ?
'0' :
'1'));
305 $form->addItem($wsp_prop);
310 $blog_prop->setChecked(($ilSetting->get(
'disable_wsp_blogs') ?
'0' :
'1'));
311 $wsp_prop->addSubItem($blog_prop);
316 $file_prop->setChecked(($ilSetting->get(
'disable_wsp_files') ?
'0' :
'1'));
317 $wsp_prop->addSubItem($file_prop);
322 $cert_prop->setChecked(($ilSetting->get(
'disable_wsp_certificates') ?
'0' :
'1'));
323 $wsp_prop->addSubItem($cert_prop);
328 $link_prop->setChecked(($ilSetting->get(
'disable_wsp_links') ?
'0' :
'1'));
329 $wsp_prop->addSubItem($link_prop);
342 require_once
'Services/WebDAV/classes/class.ilObjDiskQuotaSettings.php';
346 $lng->loadLanguageModule(
"file");
347 $cb_prop =
new ilCheckboxInputGUI($lng->txt(
"personal_workspace_disk_quota"),
"enable_personal_workspace_disk_quota");
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);
353 require_once
'Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php';
361 $form->addCommandButton(
"saveWsp", $lng->txt(
"save"));
362 $form->addCommandButton(
"editWsp", $lng->txt(
"cancel"));
364 $this->tpl->setContent($form->getHTML());
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));
391 require_once
'Services/WebDAV/classes/class.ilObjDiskQuotaSettings.php';
393 $disk_quota_obj->setPersonalWorkspaceDiskQuotaEnabled(
$_POST[
'enable_personal_workspace_disk_quota'] ==
'1');
394 $disk_quota_obj->update();
397 $ilCtrl->redirect($this,
"editWsp");
406 require_once
'Services/WebDAV/classes/class.ilObjDiskQuotaSettings.php';
411 return array(array(
"editWsp", $fields));