4 include_once(
"./Services/Object/classes/class.ilObject2GUI.php");
58 public function __construct($a_id = 0, $a_id_type = self::REPOSITORY_NODE_ID, $a_parent_node_id = 0)
61 parent::__construct($a_id, $a_id_type, $a_parent_node_id);
63 $this->rbacsystem = $DIC->rbac()->system();
64 $this->error = $DIC[
"ilErr"];
65 $this->access = $DIC->access();
66 $this->lng = $DIC->language();
67 $this->ctrl = $DIC->ctrl();
69 $this->tabs = $DIC->tabs();
70 $this->toolbar = $DIC->toolbar();
71 $this->tpl = $DIC[
"tpl"];
72 $this->db = $DIC->database();
94 $lng->loadLanguageModule(
"help");
96 $next_class = $this->ctrl->getNextClass($this);
97 $cmd = $this->ctrl->getCmd();
101 if (!$ilAccess->checkAccess(
'read',
'', $this->object->getRefId())) {
102 $ilErr->raiseError($this->lng->txt(
'no_permission'),
$ilErr->WARNING);
105 switch ($next_class) {
106 case 'ilpermissiongui':
107 $this->tabs_gui->setTabActive(
'perm_settings');
108 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
110 $ret = $this->ctrl->forwardCommand($perm_gui);
114 if (!$cmd || $cmd ==
'view') {
115 $cmd =
"editSettings";
135 $ilTabs->activateTab(
"settings");
138 ilUtil::sendInfo(
"This installation is used for online help authoring. Help modules cannot be imported.");
144 include_once(
"./Services/Form/classes/class.ilFileInputGUI.php");
147 $ilToolbar->addInputItem($fi,
true);
148 $ilToolbar->addFormButton(
$lng->txt(
"upload"),
"uploadHelpFile");
149 $ilToolbar->addSeparator();
152 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
154 "" =>
$lng->txt(
"help_tooltips_and_help"),
155 "1" =>
$lng->txt(
"help_help_only"),
156 "2" =>
$lng->txt(
"help_tooltips_only")
161 $ilToolbar->addInputItem($si);
163 $ilToolbar->addFormButton(
$lng->txt(
"help_set_mode"),
"setMode");
165 $ilToolbar->setFormAction(
$ilCtrl->getFormAction($this),
true);
167 include_once(
"./Services/Help/classes/class.ilHelpModuleTableGUI.php");
170 $this->tpl->setContent(
$tab->getHTML());
179 $this->tabs_gui->addTab(
181 $this->lng->txt(
"settings"),
182 $this->ctrl->getLinkTarget($this,
"editSettings")
187 $this->tabs_gui->addTab(
189 $this->lng->txt(
"perm_settings"),
190 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm")
210 $this->
object->uploadHelpModule($_FILES[
"help_file"]);
211 ilUtil::sendSuccess(
$lng->txt(
"help_module_uploaded"),
true);
214 $ilCtrl->redirect($this,
"editSettings");
228 if (!is_array(
$_POST[
"id"]) || count(
$_POST[
"id"]) == 0) {
230 $ilCtrl->redirect($this,
"editSettings");
232 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
234 $cgui->setFormAction(
$ilCtrl->getFormAction($this));
235 $cgui->setHeaderText(
$lng->txt(
"help_sure_delete_help_modules"));
236 $cgui->setCancel(
$lng->txt(
"cancel"),
"editSettings");
237 $cgui->setConfirm(
$lng->txt(
"delete"),
"deleteHelpModules");
240 $cgui->addItem(
"id[]", $i, $this->object->lookupModuleTitle($i));
243 $tpl->setContent($cgui->getHTML());
260 if (is_array(
$_POST[
"id"])) {
262 $this->
object->deleteModule((
int) $i);
266 $ilCtrl->redirect($this,
"editSettings");
284 ilUtil::sendSuccess(
$lng->txt(
"msg_obj_modified"),
true);
285 $ilCtrl->redirect($this,
"editSettings");
304 ilUtil::sendSuccess(
$lng->txt(
"msg_obj_modified"),
true);
306 $ilCtrl->redirect($this,
"editSettings");
325 ilUtil::sendSuccess(
$lng->txt(
"msg_obj_modified"),
true);
328 $ilCtrl->redirect($this,
"editSettings");
__construct($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
Constructor.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
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.
deactivateModule()
Deactivate module.
executeCommand()
Execute command.
getAdminTabs()
administration tabs show only permissions and trash folder
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
confirmHelpModulesDeletion()
Confirm help modules deletion.
prepareOutput($a_show_subobjects=true)
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
uploadHelpFile()
Upload help file.
activateModule()
Activate module.
Confirmation screen class.