3 include_once(
"./Services/Object/classes/class.ilObjectGUI.php");
23 public function __construct($a_data, $a_id, $a_call_by_reference =
true, $a_prepare_output =
true)
28 $this->lng->loadLanguageModule(
'forum');
39 global $rbacsystem,
$ilErr,$ilAccess;
41 $next_class = $this->ctrl->getNextClass($this);
42 $cmd = $this->ctrl->getCmd();
53 case 'ilpermissiongui':
54 $this->tabs_gui->setTabActive(
'perm_settings');
55 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
57 $ret =& $this->ctrl->forwardCommand($perm_gui);
63 $cmd =
"editSettings";
80 global $rbacsystem, $ilAccess;
82 if ($rbacsystem->checkAccess(
"visible,read",$this->object->getRefId()))
84 $this->tabs_gui->addTarget(
"settings",
85 $this->ctrl->getLinkTarget($this,
"editSettings"),
86 array(
"editSettings",
"view"));
89 if ($rbacsystem->checkAccess(
'edit_permission',$this->object->getRefId()))
91 $this->tabs_gui->addTarget(
"perm_settings",
92 $this->ctrl->getLinkTargetByClass(
'ilpermissiongui',
"perm"),
93 array(),
'ilpermissiongui');
105 $this->tabs_gui->setTabActive(
'forum_edit_settings');
107 $ilTabs->activateSubTab(
"settings");
124 if(isset(
$_POST[
'anonymous_fora']))
125 $ilSetting->set(
'enable_anonymous_fora', 1);
126 else $ilSetting->set(
'enable_anonymous_fora', 0);
128 if(isset(
$_POST[
'fora_statistics']))
129 $ilSetting->set(
'enable_fora_statistics', 1);
130 else $ilSetting->set(
'enable_fora_statistics', 0);
135 $ilCtrl->redirect($this,
"view");
145 $ilCtrl->redirect($this,
"view");
157 $this->tabs_gui->setTabActive(
'settings');
160 include_once(
'Services/Form/classes/class.ilPropertyFormGUI.php');
162 $form->setFormAction($this->ctrl->getFormAction($this));
163 $form->setTitle($this->lng->txt(
'settings'));
164 $form->addCommandButton(
'saveSettings',$this->lng->txt(
'save'));
165 $form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
169 $frm_radio =
new ilRadioGroupInputGUI($this->lng->txt(
'show_topics_overview'),
'forum_overview');
170 $frm_radio->
addOption(
new ilRadioOption($this->lng->txt(
'new').
', '.$this->lng->txt(
'is_read').
', '.$this->lng->txt(
'unread'),
'0'));
171 $frm_radio->addOption(
new ilRadioOption($this->lng->txt(
'is_read').
', '.$this->lng->txt(
'unread'),
'1'));
172 $frm_radio->setValue($frma_set->get(
'forum_overview'));
173 $frm_radio->setInfo($this->lng->txt(
'topics_overview_info'));
174 $form->addItem($frm_radio);
176 $this->fora_statistics = (bool) $ilSetting->get(
'enable_fora_statistics',
false);
177 $this->anonymous_fora = (bool) $ilSetting->get(
'enable_anonymous_fora',
false);
178 $check =
new ilCheckboxInputGui($this->lng->txt(
'enable_fora_statistics'),
'fora_statistics');
179 $check->setInfo($this->lng->txt(
'enable_fora_statistics_desc'));
180 $check->setChecked($this->fora_statistics);
181 $form->addItem($check);
183 $check =
new ilCheckboxInputGui($this->lng->txt(
'enable_anonymous_fora'),
'anonymous_fora');
184 $check->setInfo($this->lng->txt(
'enable_anonymous_fora_desc'));
185 $check->setChecked($this->anonymous_fora);
186 $form->addItem($check);
188 $frm_sel =
new ilSelectInputGUI($this->lng->txt(
'cron_forum_notification'),
'forum_notification');
189 $notification_options = array(
190 0 => $this->lng->txt(
'cron_forum_notification_never'),
191 1 => $this->lng->txt(
'cron_forum_notification_directly'),
192 2 => $this->lng->txt(
'cron_forum_notification_cron'));
195 $frm_sel->setValue($ilSetting->get(
'forum_notification'));
196 $frm_sel->setInfo($this->lng->txt(
'cron_forum_notification_desc'));
197 $form->addItem($frm_sel);
199 $this->tpl->setContent($form->getHTML());