4 require_once
'Services/Object/classes/class.ilObjectGUI.php';
5 require_once
'Modules/Forum/classes/class.ilForumProperties.php';
21 public function __construct($a_data, $a_id, $a_call_by_reference =
true, $a_prepare_output =
true)
24 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
25 $this->lng->loadLanguageModule(
'forum');
33 $next_class = $this->ctrl->getNextClass($this);
34 $cmd = $this->ctrl->getCmd();
40 case 'ilpermissiongui':
41 $this->tabs_gui->setTabActive(
'perm_settings');
42 require_once
'Services/AccessControl/classes/class.ilPermissionGUI.php';
49 $cmd =
'editSettings';
68 if($rbacsystem->checkAccess(
'visible,read', $this->object->getRefId()))
70 $this->tabs_gui->addTarget(
'settings',
71 $this->ctrl->getLinkTarget($this,
'editSettings'),
72 array(
'editSettings',
'view'));
75 if($rbacsystem->checkAccess(
'edit_permission', $this->object->getRefId()))
77 $this->tabs_gui->addTarget(
'perm_settings',
78 $this->ctrl->getLinkTargetByClass(
'ilpermissiongui',
'perm'),
79 array(),
'ilpermissiongui');
88 $this->tabs_gui->setTabActive(
'settings');
93 $this->populateForm($form);
96 $this->tpl->setContent($form->getHtml());
102 public function saveSettings()
112 if(!$form->checkInput())
114 $form->setValuesByPost();
120 $frma_set->set(
'forum_overview', $form->getInput(
'forum_overview'));
121 $ilSetting->set(
'file_upload_allowed_fora', (
int)$form->getInput(
'file_upload_allowed_fora'));
122 $ilSetting->set(
'enable_fora_statistics', (
int)$form->getInput(
'fora_statistics'));
123 $ilSetting->set(
'enable_anonymous_fora', (
int)$form->getInput(
'anonymous_fora'));
125 require_once
'Services/Cron/classes/class.ilCronManager.php';
128 $ilSetting->set(
'forum_notification', (
int)$form->getInput(
'forum_notification'));
131 require_once
'Services/Captcha/classes/class.ilCaptchaUtil.php';
132 ilCaptchaUtil::setActiveForForum((
bool)$form->getInput(
'activate_captcha_anonym'));
135 $form->setValuesByPost();
149 require_once
'Services/Captcha/classes/class.ilCaptchaUtil.php';
154 'forum_overview' => (
bool)$frma_set->get(
'forum_overview',
false),
155 'fora_statistics' => (bool)$ilSetting->get(
'enable_fora_statistics',
false),
156 'anonymous_fora' => (bool)$ilSetting->get(
'enable_anonymous_fora',
false),
157 'forum_notification' => (int)$ilSetting->get(
'forum_notification') === 1 ? true :
false,
158 'activate_captcha_anonym' => ilCaptchaUtil::isActiveForForum(),
168 require_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
170 $form->
setFormAction($this->ctrl->getFormAction($this,
'saveSettings'));
171 $form->
setTitle($this->lng->txt(
'settings'));
173 $frm_radio =
new ilRadioGroupInputGUI($this->lng->txt(
'frm_displayed_infos'),
'forum_overview');
174 $frm_radio->
addOption(
new ilRadioOption($this->lng->txt(
'new') .
', ' . $this->lng->txt(
'is_read') .
', ' . $this->lng->txt(
'unread'),
'0'));
175 $frm_radio->addOption(
new ilRadioOption($this->lng->txt(
'is_read') .
', ' . $this->lng->txt(
'unread'),
'1'));
176 $frm_radio->setInfo($this->lng->txt(
'frm_disp_info_desc'));
179 $check =
new ilCheckboxInputGui($this->lng->txt(
'enable_fora_statistics'),
'fora_statistics');
180 $check->setInfo($this->lng->txt(
'enable_fora_statistics_desc'));
183 $check =
new ilCheckboxInputGui($this->lng->txt(
'enable_anonymous_fora'),
'anonymous_fora');
184 $check->setInfo($this->lng->txt(
'enable_anonymous_fora_desc'));
187 $file_upload =
new ilRadioGroupInputGUI($this->lng->txt(
'file_upload_allowed_fora'),
'file_upload_allowed_fora');
190 $file_upload->setInfo($this->lng->txt(
'file_upload_allowed_fora_desc'));
193 require_once
'Services/Cron/classes/class.ilCronManager.php';
196 require_once
'Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php';
205 $notifications =
new ilCheckboxInputGui($this->lng->txt(
'cron_forum_notification'),
'forum_notification');
206 $notifications->setInfo($this->lng->txt(
'cron_forum_notification_desc'));
207 $notifications->setValue(1);
208 $form->
addItem($notifications);
211 require_once
'Services/Captcha/classes/class.ilCaptchaUtil.php';
212 $cap =
new ilCheckboxInputGUI($this->lng->txt(
'adm_captcha_anonymous_short'),
'activate_captcha_anonym');
213 $cap->
setInfo($this->lng->txt(
'adm_captcha_anonymous_frm'));
217 $cap->setAlert(ilCaptchaUtil::getPreconditionsMessage());
231 public function addToExternalSettingsForm($a_form_id)
247 return array(array(
"editSettings", $fields));
250 require_once
'Services/Captcha/classes/class.ilCaptchaUtil.php';
255 return array(
'obj_frma' => array(
'editSettings', $fields));
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
This class represents an option in a radio group.
__construct($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
Contructor public.
static checkFreetype()
Check whether captcha support is active.
const FILE_UPLOAD_INDIVIDUAL
const FILE_UPLOAD_GLOBALLY_ALLOWED
editSettings(ilPropertyFormGUI $form=null)
Class ilObjectGUI Basic methods of all Output classes.
getAdminTabs(&$tabs_gui)
administration tabs show only permissions and trash folder
prepareOutput()
prepare output
Forum Administration Settings.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
static isJobActive($a_job_id)
Check if given job is currently active.