ILIAS  release_4-4 Revision
All Data Structures Namespaces Files Functions Variables Modules Pages
ilObjHelpSettingsGUI Class Reference

Help settings gui class. More...

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

Public Member Functions

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

Additional Inherited Members

- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root. More...
 
- 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
 
- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $ilias
 
 $objDefinition
 
 $tpl
 
 $tree
 
 $lng
 
 $data
 
 $object
 
 $ref_id
 
 $obj_id
 
 $maxcount
 
 $formaction
 
 $return_location
 
 $target_frame
 
 $tab_target_script
 
 $actions
 
 $sub_objects
 
 $omit_locator = false
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 
- Protected Member Functions inherited from ilObject2GUI
 afterConstructor ()
 Do anything that should be done after constructor in here. More...
 
 assignObject ()
 create object instance as internal property (repository/workspace switch) More...
 
 getAccessHandler ()
 Get access handler. More...
 
 setLocator ()
 set Locator More...
 
 deleteConfirmation ()
 Display delete confirmation form (workspace specific) More...
 
 deleteConfirmedObjects ()
 Delete objects (workspace specific) More...
 
 prepareOutput ()
 
 setTitleAndDescription ()
 
 showUpperIcon ()
 
 omitLocator ($a_omit=true)
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 
 setTargetFrame ($a_cmd, $a_target_frame)
 
 getCenterColumnHTML ()
 
 getRightColumnHTML ()
 
 setColumnSettings ($column_gui)
 
 checkPermission ($a_perm, $a_cmd="")
 
 showPossibleSubObjects ()
 
 redirectToRefId ()
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 
 fillCloneSearchTemplate ($a_tpl_varname, $a_type)
 
 searchCloneSource ()
 
 buildCloneSelect ($existing_objs)
 
 addAdminLocatorItems ()
 
 setTabs ()
 create tabs (repository/workspace switch) More...
 
 getReturnLocation ()
 Deprecated functions. More...
 
 setReturnLocation ()
 
 showActions ()
 
 getTitlesByRefId ()
 
 getTabs ()
 
 __showButton ()
 
 hitsperpageObject ()
 
 __initTableGUI ()
 
 __setTableGUIBasicData ()
 
 addLocatorItems ()
 Functions to be overwritten. More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
 Check permission. More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 redrawHeaderAction ()
 Updating icons after ajax call. More...
 
 getPermanentLinkWidget ($a_append=null, $a_center=false)
 
 handleAutoRating (ilObject $a_new_obj)
 
- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 
 prepareOutput ()
 prepare output More...
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 showMountWebfolderIcon ()
 
 setTabs ()
 set admin tabs public More...
 
 setAdminTabs ()
 set admin tabs public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste More...
 
 getTabs (&$tabs_gui)
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 redirectToRefId ($a_ref_id, $a_cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value More...
 
 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. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings ($column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 
- Protected Attributes inherited from ilObject2GUI
 $object_id
 
 $node_id
 
 $creation_forms = array()
 
 $id_type = array()
 
 $parent_id
 
 $access_handler
 

Detailed Description

Member Function Documentation

◆ activateModule()

ilObjHelpSettingsGUI::activateModule ( )

Activate module.

Parameters

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

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

222  {
223  global $ilSetting, $lng, $ilCtrl;
224 
225  $ilSetting->set("help_module", (int) $_GET["hm_id"]);
226  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
227  $ilCtrl->redirect($this, "editSettings");
228  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
global $ilSetting
Definition: privfeed.php:40
+ Here is the call graph for this function:

◆ confirmHelpModulesDeletion()

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().

168  {
169  global $ilCtrl, $tpl, $lng;
170 
171  if (!is_array($_POST["id"]) || count($_POST["id"]) == 0)
172  {
173  ilUtil::sendInfo($lng->txt("no_checkbox"), true);
174  $ilCtrl->redirect($this, "editSettings");
175  }
176  else
177  {
178  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
179  $cgui = new ilConfirmationGUI();
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");
184 
185  foreach ($_POST["id"] as $i)
186  {
187  $cgui->addItem("id[]", $i, $this->object->lookupModuleTitle($i));
188  }
189 
190  $tpl->setContent($cgui->getHTML());
191  }
192  }
$_POST['username']
Definition: cron.php:12
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
Confirmation screen class.
+ Here is the call graph for this function:

◆ deactivateModule()

ilObjHelpSettingsGUI::deactivateModule ( )

Deactivate module.

Parameters

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

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

237  {
238  global $ilSetting, $lng, $ilCtrl;
239 
240  if ($ilSetting->get("help_module") == (int) $_GET["hm_id"])
241  {
242  $ilSetting->set("help_module", "");
243  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
244  }
245  $ilCtrl->redirect($this, "editSettings");
246  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
global $ilSetting
Definition: privfeed.php:40
+ Here is the call graph for this function:

◆ deleteHelpModules()

ilObjHelpSettingsGUI::deleteHelpModules ( )

Delete help modules.

Parameters

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

References $_POST, and $ilCtrl.

201  {
202  global $ilDB, $ilCtrl;
203 
204  if (is_array($_POST["id"]))
205  {
206  foreach ($_POST["id"] as $i)
207  {
208  $this->object->deleteModule((int) $i);
209  }
210  }
211 
212  $ilCtrl->redirect($this, "editSettings");
213  }
$_POST['username']
Definition: cron.php:12
global $ilCtrl
Definition: ilias.php:18

◆ 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().

74  {
75  global $ilCtrl, $lng, $ilSetting, $ilTabs, $ilToolbar;
76 
77  $ilTabs->activateTab("settings");
78 
79  if (OH_REF_ID > 0)
80  {
81  ilUtil::sendInfo("This installation is used for online help authoring. Help modules cannot be imported.");
82  return;
83  }
84 
85  if ($this->checkPermissionBool("write"))
86  {
87  // help file
88  include_once("./Services/Form/classes/class.ilFileInputGUI.php");
89  $fi = new ilFileInputGUI($lng->txt("help_help_file"), "help_file");
90  $fi->setSuffixes(array("zip"));
91  $ilToolbar->addInputItem($fi, true);
92  $ilToolbar->addFormButton($lng->txt("upload"), "uploadHelpFile");
93  $ilToolbar->addSeparator();
94 
95  // help mode
96  include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
97  $options = array(
98  "" => $lng->txt("help_tooltips_and_help"),
99  "1" => $lng->txt("help_help_only"),
100  "2" => $lng->txt("help_tooltips_only")
101  );
102  $si = new ilSelectInputGUI($this->lng->txt("help_mode"), "help_mode");
103  $si->setOptions($options);
104  $si->setValue($ilSetting->get("help_mode"));
105  $ilToolbar->addInputItem($si);
106 
107  $ilToolbar->addFormButton($lng->txt("help_set_mode"), "setMode");
108 
109  }
110  $ilToolbar->setFormAction($ilCtrl->getFormAction($this), true);
111 
112  include_once("./Services/Help/classes/class.ilHelpModuleTableGUI.php");
113  $tab = new ilHelpModuleTableGUI($this, "editSettings");
114 
115  $this->tpl->setContent($tab->getHTML());
116  }
This class represents a selection list property in a property form.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
This class represents a file property in a property form.
TableGUI class for help modules.
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
if(!is_array($argv)) $options
setOptions($a_options)
Set Options.
global $ilSetting
Definition: privfeed.php:40
setSuffixes($a_suffixes)
Set Accepted Suffixes.
+ Here is the call graph for this function:

◆ executeCommand()

ilObjHelpSettingsGUI::executeCommand ( )

Execute command.

public

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

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

34  {
35  global $rbacsystem, $ilErr, $ilAccess, $lng;
36 
37  $lng->loadLanguageModule("help");
38 
39  $next_class = $this->ctrl->getNextClass($this);
40  $cmd = $this->ctrl->getCmd();
41 
42  $this->prepareOutput();
43 
44  if (!$ilAccess->checkAccess('read','',$this->object->getRefId()))
45  {
46  $ilErr->raiseError($this->lng->txt('no_permission'),$ilErr->WARNING);
47  }
48 
49  switch($next_class)
50  {
51  case 'ilpermissiongui':
52  $this->tabs_gui->setTabActive('perm_settings');
53  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
54  $perm_gui =& new ilPermissionGUI($this);
55  $ret =& $this->ctrl->forwardCommand($perm_gui);
56  break;
57 
58  default:
59  if(!$cmd || $cmd == 'view')
60  {
61  $cmd = "editSettings";
62  }
63 
64  $this->$cmd();
65  break;
66  }
67  return true;
68  }
$cmd
Definition: sahs_server.php:35
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjHelpSettingsGUI::getAdminTabs ( $tabs_gui)

administration tabs show only permissions and trash folder

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

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

122  {
123  global $tree;
124 
125  if ($this->checkPermissionBool("visible,read"))
126  {
127  $tabs_gui->addTab("settings",
128  $this->lng->txt("settings"),
129  $this->ctrl->getLinkTarget($this, "editSettings"));
130 
131  }
132 
133  if ($this->checkPermissionBool("edit_permission"))
134  {
135  $tabs_gui->addTab("perm_settings",
136  $this->lng->txt("perm_settings"),
137  $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm")
138  );
139  }
140  }
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
+ Here is the call graph for this function:

◆ getType()

ilObjHelpSettingsGUI::getType ( )

Get type.

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

23  {
24  return "hlps";
25  }

◆ setMode()

ilObjHelpSettingsGUI::setMode ( )

Set mode.

Parameters

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

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

255  {
256  global $lng, $ilCtrl, $ilSetting;
257 
258  if ($this->checkPermissionBool("write"))
259  {
260  $ilSetting->set("help_mode", ilUtil::stripSlashes($_POST["help_mode"]));
261  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
262  }
263 
264  $ilCtrl->redirect($this, "editSettings");
265  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
global $ilCtrl
Definition: ilias.php:18
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
global $ilSetting
Definition: privfeed.php:40
+ Here is the call graph for this function:

◆ uploadHelpFile()

ilObjHelpSettingsGUI::uploadHelpFile ( )

Upload help file.

Parameters

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

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

152  {
153  global $lng, $ilCtrl;
154 
155  if ($this->checkPermissionBool("write"))
156  {
157  $this->object->uploadHelpModule($_FILES["help_file"]);
158  ilUtil::sendSuccess($lng->txt("help_module_uploaded"), true);
159  }
160 
161  $ilCtrl->redirect($this, "editSettings");
162  }
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.
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:

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