38 include_once
"classes/class.ilObjectGUI.php";
49 $this->
ilObjectGUI($a_data,$a_id,$a_call_by_reference,
false);
50 $this->folderSettings =
new ilSetting(
'fold');
61 global $rbacsystem,
$ilErr,$ilAccess;
63 $next_class = $this->ctrl->getNextClass($this);
64 $cmd = $this->ctrl->getCmd();
68 if(!$ilAccess->checkAccess(
'read',
'',$this->object->getRefId()))
70 $ilErr->raiseError($this->lng->txt(
'no_permission'),$ilErr->WARNING);
75 case 'ilpermissiongui':
76 $this->tabs_gui->setTabActive(
'perm_settings');
77 include_once(
"./classes/class.ilPermissionGUI.php");
79 $ret =& $this->ctrl->forwardCommand($perm_gui);
83 $this->tabs_gui->setTabActive(
'settings');
86 $cmd =
"editSettings";
103 global $rbacsystem, $ilAccess;
105 if ($rbacsystem->checkAccess(
"visible,read",$this->object->getRefId()))
107 $this->tabs_gui->addTarget(
"settings",
108 $this->ctrl->getLinkTarget($this,
"editSettings"),
109 array(
"editSettings",
"view"));
111 if ($rbacsystem->checkAccess(
'edit_permission',$this->object->getRefId()))
113 $this->tabs_gui->addTarget(
"perm_settings",
114 $this->ctrl->getLinkTargetByClass(
'ilpermissiongui',
"perm"),
115 array(),
'ilpermissiongui');
124 global $rbacsystem,
$ilErr;
126 if (! $rbacsystem->checkAccess(
"visible,read",$this->object->getRefId()))
128 $ilErr->raiseError($this->lng->txt(
"no_permission"),$ilErr->WARNING);
133 require_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
134 require_once(
"./Services/Form/classes/class.ilCheckboxInputGUI.php");
135 require_once(
"./Services/Form/classes/class.ilRadioGroupInputGUI.php");
136 require_once(
"./Services/Form/classes/class.ilRadioOption.php");
137 require_once(
"./Services/Form/classes/class.ilTextAreaInputGUI.php");
138 require_once(
"./Services/WebDAV/classes/class.ilDAVServer.php");
141 $form->setFormAction($ilCtrl->getFormAction($this));
142 $form->setTitle($lng->txt(
"settings"));
148 $dl_prop =
new ilCheckboxInputGUI($lng->txt(
"enable_download_folder"),
"enable_download_folder");
151 $dl_prop->setChecked($this->folderSettings->get(
"enable_download_folder", 0) == 1);
152 $dl_prop->setInfo($lng->txt(
'enable_download_folder_info'));
153 $form->addItem($dl_prop);
157 $isPearAuthHTTPInstalled = @include_once(
"Auth/HTTP.php");
160 $cb_prop->setChecked($this->object->isWebdavEnabled() && $isPearAuthHTTPInstalled);
161 $cb_prop->setDisabled(! $isPearAuthHTTPInstalled);
162 $cb_prop->setInfo($isPearAuthHTTPInstalled ?
163 sprintf($lng->txt(
'enable_webdav_info'),$ilDAVServer->getMountURI($tree->getRootId(), 0, null, null,
true)) :
164 $lng->txt(
'webdav_pear_auth_http_needed')
166 $form->addItem($cb_prop);
169 $cb_prop =
new ilCheckboxInputGUI($lng->txt(
"display_webdav_actions"),
"webdav_actions_visible");
171 $cb_prop->setChecked($this->object->isWebdavActionsVisible() && $isPearAuthHTTPInstalled);
172 $cb_prop->setDisabled(! $isPearAuthHTTPInstalled);
173 $cb_prop->setInfo(sprintf($lng->txt(
'display_webdav_actions_info')));
174 $form->addItem($cb_prop);
177 if ($isPearAuthHTTPInstalled)
179 $rgi_prop =
new ilRadioGroupInputGUI($lng->txt(
'webfolder_instructions'),
'custom_webfolder_instructions_choice');
181 $rgi_prop->addOption(
new ilRadioOption($lng->txt(
'use_customized_instructions'),
'custom'));
182 $rgi_prop->setValue($this->object->isCustomWebfolderInstructionsEnabled() ?
'custom':
'default');
183 $rgi_prop->setDisabled(! $isPearAuthHTTPInstalled);
184 $form->addItem($rgi_prop);
186 $tai_prop->setValue($this->object->getCustomWebfolderInstructions());
187 $tai_prop->setInfo($lng->txt(
"webfolder_instructions_info"));
188 $tai_prop->setCols(80);
189 $tai_prop->setRows(20);
190 $tai_prop->setDisabled(! $isPearAuthHTTPInstalled);
191 $form->addItem($tai_prop);
195 $tai_prop =
new ilTextAreaInputGUI($lng->txt(
'inline_file_extensions'),
'inline_file_extensions');
196 $tai_prop->
setValue($this->object->getInlineFileExtensions());
197 $tai_prop->setInfo($lng->txt(
'inline_file_extensions_info'));
198 $tai_prop->setCols(80);
199 $tai_prop->setRows(5);
200 $form->addItem($tai_prop);
204 $form->addCommandButton(
'saveSettings', $lng->txt(
'save'));
205 $form->addCommandButton(
'view', $lng->txt(
'cancel'));
207 $tpl->setContent($form->getHTML());
215 global $rbacsystem,
$ilErr;
217 if (! $rbacsystem->checkAccess(
"write",$this->object->getRefId()))
219 $ilErr->raiseError($this->lng->txt(
"no_permission"),$ilErr->WARNING);
222 $this->
object->setWebdavEnabled($_POST[
'enable_webdav'] ==
'1');
223 $this->
object->setWebdavActionsVisible($_POST[
'webdav_actions_visible'] ==
'1');
224 $this->
object->setCustomWebfolderInstructionsEnabled($_POST[
'custom_webfolder_instructions_choice']==
'custom');
225 $this->
object->setCustomWebfolderInstructions(
ilUtil::stripSlashes($_POST[
'custom_webfolder_instructions']));
227 $this->
object->update();
229 $this->folderSettings->set(
"enable_download_folder", $_POST[
"enable_download_folder"] == 1);
240 $this->tpl->setDescription($this->object->getDescription());