4 include_once(
"./Services/Object/classes/class.ilObject2GUI.php");
37 $lng->loadLanguageModule(
"help");
39 $next_class = $this->ctrl->getNextClass($this);
40 $cmd = $this->ctrl->getCmd();
44 if (!$ilAccess->checkAccess(
'read',
'',$this->object->getRefId()))
46 $ilErr->raiseError($this->lng->txt(
'no_permission'),$ilErr->WARNING);
51 case 'ilpermissiongui':
52 $this->tabs_gui->setTabActive(
'perm_settings');
53 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
55 $ret =& $this->ctrl->forwardCommand($perm_gui);
61 $cmd =
"editSettings";
77 $ilTabs->activateTab(
"settings");
81 ilUtil::sendInfo(
"This installation is used for online help authoring. Help modules cannot be imported.");
88 include_once(
"./Services/Form/classes/class.ilFileInputGUI.php");
89 $fi =
new ilFileInputGUI($lng->txt(
"help_help_file"),
"help_file");
91 $ilToolbar->addInputItem($fi,
true);
92 $ilToolbar->addFormButton($lng->txt(
"upload"),
"uploadHelpFile");
93 $ilToolbar->addSeparator();
96 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
98 "" => $lng->txt(
"help_tooltips_and_help"),
99 "1" => $lng->txt(
"help_help_only"),
100 "2" => $lng->txt(
"help_tooltips_only")
104 $si->setValue($ilSetting->get(
"help_mode"));
105 $ilToolbar->addInputItem($si);
107 $ilToolbar->addFormButton($lng->txt(
"help_set_mode"),
"setMode");
110 $ilToolbar->setFormAction($ilCtrl->getFormAction($this),
true);
112 include_once(
"./Services/Help/classes/class.ilHelpModuleTableGUI.php");
115 $this->tpl->setContent(
$tab->getHTML());
127 $tabs_gui->addTab(
"settings",
128 $this->lng->txt(
"settings"),
129 $this->ctrl->getLinkTarget($this,
"editSettings"));
135 $tabs_gui->addTab(
"perm_settings",
136 $this->lng->txt(
"perm_settings"),
137 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm")
157 $this->
object->uploadHelpModule($_FILES[
"help_file"]);
161 $ilCtrl->redirect($this,
"editSettings");
171 if (!is_array(
$_POST[
"id"]) || count(
$_POST[
"id"]) == 0)
174 $ilCtrl->redirect($this,
"editSettings");
178 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
180 $cgui->setFormAction($ilCtrl->getFormAction($this));
181 $cgui->setHeaderText($lng->txt(
"help_sure_delete_help_modules"));
182 $cgui->setCancel($lng->txt(
"cancel"),
"editSettings");
183 $cgui->setConfirm($lng->txt(
"delete"),
"deleteHelpModules");
185 foreach (
$_POST[
"id"] as $i)
187 $cgui->addItem(
"id[]", $i, $this->object->lookupModuleTitle($i));
190 $tpl->setContent($cgui->getHTML());
204 if (is_array(
$_POST[
"id"]))
206 foreach (
$_POST[
"id"] as $i)
208 $this->
object->deleteModule((
int) $i);
212 $ilCtrl->redirect($this,
"editSettings");
225 $ilSetting->set(
"help_module", (
int)
$_GET[
"hm_id"]);
227 $ilCtrl->redirect($this,
"editSettings");
240 if ($ilSetting->get(
"help_module") == (int)
$_GET[
"hm_id"])
242 $ilSetting->set(
"help_module",
"");
245 $ilCtrl->redirect($this,
"editSettings");
264 $ilCtrl->redirect($this,
"editSettings");
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
New implementation of ilObjectGUI.
TableGUI class for help modules.
deleteHelpModules()
Delete help modules.
editSettings()
Edit news settings.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
getAdminTabs(&$tabs_gui)
administration tabs show only permissions and trash folder
deactivateModule()
Deactivate module.
if(!is_array($argv)) $options
executeCommand()
Execute command.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
confirmHelpModulesDeletion()
Confirm help modules deletion.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
uploadHelpFile()
Upload help file.
activateModule()
Activate module.
Confirmation screen class.