4 require_once
"./classes/class.ilObjectGUI.php";
5 require_once
"./Services/Notifications/classes/class.ilObjNotificationAdmin.php";
6 require_once
"./Services/Notifications/classes/class.ilObjNotificationAdminAccess.php";
25 function __construct($a_data,$a_id,$a_call_by_reference =
true, $a_prepare_output =
true) {
27 $this->
ilObjectGUI($a_data,$a_id,$a_call_by_reference,
false);
28 $this->lng->loadLanguageModule(
'notification');
38 global $ilAccess, $ilNavigationHistory,
$ilCtrl, $ilUser, $ilTabs;
40 $next_class = $this->ctrl->getNextClass($this);
41 $cmd = $this->ctrl->getCmd();
47 case 'ilpermissiongui':
49 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
51 $ret =& $this->ctrl->forwardCommand($perm_gui);
56 $ilTabs->activateTab(
"view");
77 require_once
'Services/Notifications/classes/class.ilObjNotificationAdmin.php';
79 $fileObj->setTitle(
'notification admin');
81 $fileObj->createReference();
82 $fileObj->putInTree(SYSTEM_FOLDER_ID);
88 global $ilAccess, $ilTabs,
$lng;
90 $this->ctrl->setParameter($this,
"ref_id",$this->ref_id);
92 if ($ilAccess->checkAccess(
"visible",
"", $this->ref_id))
94 $ilTabs->addTab(
"id_info",
95 $lng->txt(
"info_short"),
96 $this->ctrl->getLinkTargetByClass(array(
"ilobjfilegui",
"ilinfoscreengui"),
"showSummary"));
99 if ($ilAccess->checkAccess(
"edit_permission",
"", $this->ref_id))
101 $ilTabs->addTab(
"id_permissions",
102 $lng->txt(
"perm_settings"),
103 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"));
111 $ilTabs->addSubTabTarget(
"notification_general", $this->ctrl->getLinkTargetByClass(
'ilObjNotificationAdminGUI',
"showGeneralSettings"));
113 $ilTabs->addSubTabTarget(
"notification_admin_types", $this->ctrl->getLinkTargetByClass(
'ilObjNotificationAdminGUI',
"showTypes"));
114 $ilTabs->addSubTabTarget(
"notification_admin_matrix", $this->ctrl->getLinkTargetByClass(
'ilObjNotificationAdminGUI',
"showConfigMatrix"));
121 if (is_object($this->
object)) {
122 $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this,
""),
"",
$_GET[
"ref_id"]);
127 require_once
'Services/Notifications/classes/class.ilNotificationAdminSettingsForm.php';
131 $settings =
new ilSetting(
'notifications');
136 $form->setValuesByArray(array_merge($settings->getAll(), $form->restored_values));
139 $form->setFormAction($this->ctrl->getFormAction($this,
'saveGeneralSettings'));
140 $form->addCommandButton(
'saveGeneralSettings',
'save');
141 $form->addCommandButton(
'showGeneralSettings',
'cancel');
143 $this->tpl->setContent($form->getHtml());
147 require_once
'Services/Notifications/classes/class.ilNotificationAdminSettingsForm.php';
148 #require_once 'Services/Administration/classes/class.ilSetting.php';
150 $settings =
new ilSetting(
'notifications');
153 $form->setValuesByPost();
154 if (!$form->checkInput()) {
161 $values = $form->store_values;
163 foreach($values as $v) {
164 $settings->set($v,
$_POST[$v]);
167 foreach(
$_REQUEST[
'notifications'] as $type => $value) {
179 $ilTabs->activateSubTab(
'notification_admin_types');
181 require_once
'Services/Notifications/classes/class.ilNotificationDatabaseHelper.php';
182 require_once
'Services/Notifications/classes/class.ilNotificationAdminSettingsForm.php';
185 $form->setFormAction($this->ctrl->getFormAction($this,
'showTypes'));
186 $form->addCommandButton(
'saveTypes', $this->lng->txt(
'save'));
187 $form->addCommandButton(
'showTypes', $this->lng->txt(
'cancel'));
188 $this->tpl->setContent($form->getHtml());
195 $ilTabs->activateSubTab(
'notification_admin_channels');
197 require_once
'Services/Notifications/classes/class.ilNotificationDatabaseHelper.php';
198 require_once
'Services/Notifications/classes/class.ilNotificationAdminSettingsForm.php';
201 $form->setFormAction($this->ctrl->getFormAction($this,
'showChannels'));
202 $form->addCommandButton(
'saveChannels', $this->lng->txt(
'save'));
203 $form->addCommandButton(
'showChannels', $this->lng->txt(
'cancel'));
204 $this->tpl->setContent($form->getHtml());
209 require_once
'Services/Notifications/classes/class.ilNotificationDatabaseHelper.php';
210 foreach(
$_REQUEST[
'notifications'] as $type => $value) {
217 require_once
'Services/Notifications/classes/class.ilNotificationDatabaseHelper.php';
218 foreach(
$_REQUEST[
'notifications'] as $type => $value) {
227 $ilTabs->activateSubTab(
'notification_admin_matrix');
229 require_once
'Services/Notifications/classes/class.ilNotificationDatabaseHelper.php';
230 require_once
'Services/Notifications/classes/class.ilNotificationSettingsTable.php';
237 $table->setFormAction($ilCtrl->getFormAction($this,
'saveConfigMatrix'));
239 $table->setDescription($lng->txt(
'notification_admin_matrix_settings_table_desc'));
240 $table->addCommandButton(
'saveConfigMatrix', $lng->txt(
'save'));
241 $table->addCommandButton(
'showConfigMatrix', $lng->txt(
'cancel'));
243 $this->tpl->setContent($table->getHtml());
248 require_once
'Services/Notifications/classes/class.ilNotificationDatabaseHelper.php';