ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilObjHelpSettingsGUI Class Reference

Help settings gui class. More...

+ Inheritance diagram for ilObjHelpSettingsGUI:
+ Collaboration diagram for ilObjHelpSettingsGUI:

Public Member Functions

 getType ()
 Get type.
 executeCommand ()
 Execute command.
 editSettings ()
 Edit news settings.
 getAdminTabs (&$tabs_gui)
 administration tabs show only permissions and trash folder
 uploadHelpFile ()
 Upload help file.
 confirmHelpModulesDeletion ()
 Confirm help modules deletion.
 deleteHelpModules ()
 Delete help modules.
 activateModule ()
 Activate module.
 deactivateModule ()
 Deactivate module.
 setMode ()
 Set mode.
- Public Member Functions inherited from ilObject2GUI
 __construct ($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
 Constructor.
 delete ()
 Display delete confirmation form (repository/workspace switch)
 confirmedDelete ()
 Delete objects (repository/workspace switch)
 getHTML ()
 withReferences ()
 Final/Private declaration of unchanged parent methods.
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui
 getCreationMode ()
 get creation mode
 isVisible ()
 trash ()
 undelete ()
 cancelDelete ()
 removeFromSystem ()
 cloneAll ()
 view ()
 view object content (repository/workspace switch)
 create ()
 Deleted in ilObject.
 save ()
 edit ()
 update ()
 cancel ()
 importFile ()
 Import.
- Public Member Functions inherited from ilObjectGUI
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public.
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled
 cancelDeleteObject ()
 cancel deletion of object
 cancelObject ($in_rep=false)
 cancel action and go back to previous page public
 createObject ()
 create new object form
 cancelCreation ()
 cancel create action and go back to repository parent
 saveObject ()
 save object
 editObject ()
 edit object
 updateObject ()
 updates object entry in object_data
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g.
 isVisible ($a_ref_id, $a_type)
 viewObject ()
 list childs of current object
 deleteObject ($a_error=false)
 Display deletion confirmation screen.
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI.

Additional Inherited Members

- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root.
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root.
- Data Fields inherited from ilObject2GUI
 $tree
const OBJECT_ID = 0
const REPOSITORY_NODE_ID = 1
const WORKSPACE_NODE_ID = 2
const REPOSITORY_OBJECT_ID = 3
const WORKSPACE_OBJECT_ID = 4
const PORTFOLIO_OBJECT_ID = 5
- Protected Member Functions inherited from ilObject2GUI
 afterConstructor ()
 Do anything that should be done after constructor in here.
 assignObject ()
 create object instance as internal property (repository/workspace switch)
 getAccessHandler ()
 Get access handler.
 setLocator ()
 set Locator
 deleteConfirmation ()
 Display delete confirmation form (workspace specific)
 deleteConfirmedObjects ()
 Delete objects (workspace specific)
 prepareOutput ()
 prepare output
 setTitleAndDescription ()
 called by prepare output
 showUpperIcon ()
 omitLocator ($a_omit=true)
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g.
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command
 getCenterColumnHTML ()
 Get center column.
 getRightColumnHTML ()
 Display right column.
 setColumnSettings ($column_gui)
 May be overwritten in subclasses.
 checkPermission ($a_perm, $a_cmd="")
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu)
 redirectToRefId ()
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning.
 fillCloneSearchTemplate ($a_tpl_varname, $a_type)
 searchCloneSource ()
 buildCloneSelect ($existing_objs)
 addAdminLocatorItems ()
 setTabs ()
 create tabs (repository/workspace switch)
 getReturnLocation ()
 Deprecated functions.
 setReturnLocation ()
 showActions ()
 getTitlesByRefId ()
 getTabs ()
 __showButton ()
 hitsperpageObject ()
 __initTableGUI ()
 __setTableGUIBasicData ()
 addLocatorItems ()
 Functions to be overwritten.
 initCreationForms ($a_new_type)
 Init creation froms.
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position.
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
 Check permission.
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu.
 redrawHeaderAction ()
 Updating icons after ajax call.
 getPermanentLinkWidget ($a_append=null, $a_center=false)
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting.
- Protected Attributes inherited from ilObject2GUI
 $object_id
 $node_id
 $creation_forms = array()
 $id_type = array()
 $parent_id
 $access_handler

Detailed Description

Member Function Documentation

ilObjHelpSettingsGUI::activateModule ( )

Activate module.

Parameters
@return

Definition at line 221 of file class.ilObjHelpSettingsGUI.php.

References $_GET, $ilCtrl, $ilSetting, ilObjectGUI\$lng, and ilUtil\sendSuccess().

{
$ilSetting->set("help_module", (int) $_GET["hm_id"]);
ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
$ilCtrl->redirect($this, "editSettings");
}

+ Here is the call graph for this function:

ilObjHelpSettingsGUI::confirmHelpModulesDeletion ( )

Confirm help modules deletion.

Definition at line 167 of file class.ilObjHelpSettingsGUI.php.

References $_POST, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, and ilUtil\sendInfo().

{
global $ilCtrl, $tpl, $lng;
if (!is_array($_POST["id"]) || count($_POST["id"]) == 0)
{
ilUtil::sendInfo($lng->txt("no_checkbox"), true);
$ilCtrl->redirect($this, "editSettings");
}
else
{
include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
$cgui = new ilConfirmationGUI();
$cgui->setFormAction($ilCtrl->getFormAction($this));
$cgui->setHeaderText($lng->txt("help_sure_delete_help_modules"));
$cgui->setCancel($lng->txt("cancel"), "editSettings");
$cgui->setConfirm($lng->txt("delete"), "deleteHelpModules");
foreach ($_POST["id"] as $i)
{
$cgui->addItem("id[]", $i, $this->object->lookupModuleTitle($i));
}
$tpl->setContent($cgui->getHTML());
}
}

+ Here is the call graph for this function:

ilObjHelpSettingsGUI::deactivateModule ( )

Deactivate module.

Parameters
@return

Definition at line 236 of file class.ilObjHelpSettingsGUI.php.

References $_GET, $ilCtrl, $ilSetting, ilObjectGUI\$lng, and ilUtil\sendSuccess().

{
if ($ilSetting->get("help_module") == (int) $_GET["hm_id"])
{
$ilSetting->set("help_module", "");
ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
}
$ilCtrl->redirect($this, "editSettings");
}

+ Here is the call graph for this function:

ilObjHelpSettingsGUI::deleteHelpModules ( )

Delete help modules.

Parameters
@return

Definition at line 200 of file class.ilObjHelpSettingsGUI.php.

References $_POST, and $ilCtrl.

{
global $ilDB, $ilCtrl;
if (is_array($_POST["id"]))
{
foreach ($_POST["id"] as $i)
{
$this->object->deleteModule((int) $i);
}
}
$ilCtrl->redirect($this, "editSettings");
}
ilObjHelpSettingsGUI::editSettings ( )

Edit news settings.

Definition at line 73 of file class.ilObjHelpSettingsGUI.php.

References $ilCtrl, $ilSetting, ilObjectGUI\$lng, $options, $si, $tab, ilObject2GUI\checkPermissionBool(), ilUtil\sendInfo(), ilSelectInputGUI\setOptions(), and ilFileInputGUI\setSuffixes().

{
global $ilCtrl, $lng, $ilSetting, $ilTabs, $ilToolbar;
$ilTabs->activateTab("settings");
if (OH_REF_ID > 0)
{
ilUtil::sendInfo("This installation is used for online help authoring. Help modules cannot be imported.");
return;
}
if ($this->checkPermissionBool("write"))
{
// help file
include_once("./Services/Form/classes/class.ilFileInputGUI.php");
$fi = new ilFileInputGUI($lng->txt("help_help_file"), "help_file");
$fi->setSuffixes(array("zip"));
$ilToolbar->addInputItem($fi, true);
$ilToolbar->addFormButton($lng->txt("upload"), "uploadHelpFile");
$ilToolbar->addSeparator();
// help mode
include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
$options = array(
"" => $lng->txt("help_tooltips_and_help"),
"1" => $lng->txt("help_help_only"),
"2" => $lng->txt("help_tooltips_only")
);
$si = new ilSelectInputGUI($this->lng->txt("help_mode"), "help_mode");
$si->setValue($ilSetting->get("help_mode"));
$ilToolbar->addInputItem($si);
$ilToolbar->addFormButton($lng->txt("help_set_mode"), "setMode");
}
$ilToolbar->setFormAction($ilCtrl->getFormAction($this), true);
include_once("./Services/Help/classes/class.ilHelpModuleTableGUI.php");
$tab = new ilHelpModuleTableGUI($this, "editSettings");
$this->tpl->setContent($tab->getHTML());
}

+ Here is the call graph for this function:

ilObjHelpSettingsGUI::executeCommand ( )

Execute command.

public

Reimplemented from ilObject2GUI.

Definition at line 33 of file class.ilObjHelpSettingsGUI.php.

References $cmd, $ilErr, ilObjectGUI\$lng, $ret, and ilObject2GUI\prepareOutput().

{
global $rbacsystem, $ilErr, $ilAccess, $lng;
$lng->loadLanguageModule("help");
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd();
$this->prepareOutput();
if (!$ilAccess->checkAccess('read','',$this->object->getRefId()))
{
$ilErr->raiseError($this->lng->txt('no_permission'),$ilErr->WARNING);
}
switch($next_class)
{
case 'ilpermissiongui':
$this->tabs_gui->setTabActive('perm_settings');
include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
$perm_gui =& new ilPermissionGUI($this);
$ret =& $this->ctrl->forwardCommand($perm_gui);
break;
default:
if(!$cmd || $cmd == 'view')
{
$cmd = "editSettings";
}
$this->$cmd();
break;
}
return true;
}

+ Here is the call graph for this function:

ilObjHelpSettingsGUI::getAdminTabs ( $tabs_gui)

administration tabs show only permissions and trash folder

Reimplemented from ilObjectGUI.

Definition at line 121 of file class.ilObjHelpSettingsGUI.php.

References ilObject2GUI\$tree, and ilObject2GUI\checkPermissionBool().

{
global $tree;
if ($this->checkPermissionBool("visible,read"))
{
$tabs_gui->addTab("settings",
$this->lng->txt("settings"),
$this->ctrl->getLinkTarget($this, "editSettings"));
}
if ($this->checkPermissionBool("edit_permission"))
{
$tabs_gui->addTab("perm_settings",
$this->lng->txt("perm_settings"),
$this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm")
);
}
}

+ Here is the call graph for this function:

ilObjHelpSettingsGUI::getType ( )

Get type.

Reimplemented from ilObject2GUI.

Definition at line 22 of file class.ilObjHelpSettingsGUI.php.

{
return "hlps";
}
ilObjHelpSettingsGUI::setMode ( )

Set mode.

Parameters
@return

Definition at line 254 of file class.ilObjHelpSettingsGUI.php.

References $_POST, $ilCtrl, $ilSetting, ilObjectGUI\$lng, ilObject2GUI\checkPermissionBool(), ilUtil\sendSuccess(), and ilUtil\stripSlashes().

{
if ($this->checkPermissionBool("write"))
{
$ilSetting->set("help_mode", ilUtil::stripSlashes($_POST["help_mode"]));
ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
}
$ilCtrl->redirect($this, "editSettings");
}

+ Here is the call graph for this function:

ilObjHelpSettingsGUI::uploadHelpFile ( )

Upload help file.

Parameters
@return

Definition at line 151 of file class.ilObjHelpSettingsGUI.php.

References $ilCtrl, ilObjectGUI\$lng, ilObject2GUI\checkPermissionBool(), and ilUtil\sendSuccess().

{
global $lng, $ilCtrl;
if ($this->checkPermissionBool("write"))
{
$this->object->uploadHelpModule($_FILES["help_file"]);
ilUtil::sendSuccess($lng->txt("help_module_uploaded"), true);
}
$ilCtrl->redirect($this, "editSettings");
}

+ Here is the call graph for this function:


The documentation for this class was generated from the following file: