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

Skill management main GUI class. More...

+ Inheritance diagram for ilObjSkillManagementGUI:
+ Collaboration diagram for ilObjSkillManagementGUI:

Public Member Functions

 __construct ($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
 Contructor. More...
 
 executeCommand ()
 Execute command. More...
 
 getAdminTabs ()
 Get tabs. More...
 
 editSettings ()
 Edit news settings. More...
 
 saveSettings ()
 Save skill management settings. More...
 
 editSkills ()
 Edit skills. More...
 
 saveAllTitles ($a_succ_mess=true)
 Save all titles of chapters/scos/pages. More...
 
 saveAllTemplateTitles ($a_succ_mess=true)
 Save all titles of chapters/scos/pages. More...
 
 expandAll ($a_redirect=true)
 Expand all. More...
 
 collapseAll ($a_redirect=true)
 Collapse all. More...
 
 deleteNodes ($a_gui)
 confirm deletion screen of skill tree nodes More...
 
 cancelDelete ()
 cancel delete More...
 
 confirmedDelete ()
 Delete chapters/scos/pages. More...
 
 test ()
 Test getCompletionDateForTriggerRefId. More...
 
 testCert ()
 Test checkUserCertificateForTriggerRefId. More...
 
 testAllCert ()
 Test getTriggerOfAllCertificates. More...
 
 testLevels ()
 Test getSkillLevelsForTrigger. More...
 
 setTestSubtabs ($a_act)
 Set test subtabs. More...
 
 editSkillTemplates ()
 Edit skill templates. More...
 
 showTree ($a_templates, $a_gui="", $a_gui_cmd="")
 Show Editing Tree. 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...
 

Protected Attributes

 $skill_tree
 

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

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjSkillManagementGUI::__construct (   $a_data,
  $a_id,
  $a_call_by_reference = true,
  $a_prepare_output = true 
)

Contructor.

public

Definition at line 27 of file class.ilObjSkillManagementGUI.php.

References $ilCtrl.

28  {
29  global $ilCtrl;
30 
31  $this->type = 'skmg';
32  parent::ilObjectGUI($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
33 
34  $this->lng->loadLanguageModule('skmg');
35 
36  include_once("./Services/Skill/classes/class.ilSkillTree.php");
37  $this->skill_tree = new ilSkillTree();
38 
39  $ilCtrl->saveParameter($this, "obj_id");
40  }
Skill tree.
global $ilCtrl
Definition: ilias.php:18

Member Function Documentation

◆ cancelDelete()

ilObjSkillManagementGUI::cancelDelete ( )

cancel delete

Definition at line 463 of file class.ilObjSkillManagementGUI.php.

464  {
465  $this->ctrl->redirect($this, "editSkills");
466  }

◆ collapseAll()

ilObjSkillManagementGUI::collapseAll (   $a_redirect = true)

Collapse all.

Definition at line 332 of file class.ilObjSkillManagementGUI.php.

References $_GET, $_SESSION, $n, and saveAllTitles().

333  {
334  $_GET["skexpand"] = "";
335  $n_id = ($_GET["obj_id"] > 0)
336  ? $_GET["obj_id"]
337  : $this->skill_tree->readRootId();
338  $stree = $this->skill_tree->getSubTree($this->skill_tree->getNodeData($n_id));
339  $old = $_SESSION["skexpand"];
340  foreach ($stree as $n)
341  {
342  if (in_array($n["child"], $old) && $n["child"] != $n_id)
343  {
344  $k = array_search($n["child"], $old);
345  unset($old[$k]);
346  }
347  }
348  $_SESSION["skexpand"] = $old;
349  $this->saveAllTitles(false);
350  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
$_GET["client_id"]
$n
Definition: RandomTest.php:80
saveAllTitles($a_succ_mess=true)
Save all titles of chapters/scos/pages.
+ Here is the call graph for this function:

◆ confirmedDelete()

ilObjSkillManagementGUI::confirmedDelete ( )

Delete chapters/scos/pages.

Definition at line 471 of file class.ilObjSkillManagementGUI.php.

References $_POST, $ilCtrl, ilSkillTreeNodeFactory\getInstance(), IL_FIRST_NODE, and ilUtil\sendInfo().

472  {
473  global $ilCtrl;
474 
475  // delete all selected objects
476  include_once("./Services/Skill/classes/class.ilSkillTreeNodeFactory.php");
477  foreach ($_POST["id"] as $id)
478  {
479  if ($id != IL_FIRST_NODE)
480  {
482  $node_data = $this->skill_tree->getNodeData($id);
483  if (is_object($obj))
484  {
485  $obj->delete();
486  }
487  if($this->skill_tree->isInTree($id))
488  {
489  $this->skill_tree->deleteTree($node_data);
490  }
491  }
492  }
493 
494  // feedback
495  ilUtil::sendInfo($this->lng->txt("info_deleted"),true);
496  }
$_POST['username']
Definition: cron.php:12
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
const IL_FIRST_NODE
Definition: class.ilTree.php:5
+ Here is the call graph for this function:

◆ deleteNodes()

ilObjSkillManagementGUI::deleteNodes (   $a_gui)

confirm deletion screen of skill tree nodes

Definition at line 355 of file class.ilObjSkillManagementGUI.php.

References $_GET, $_POST, $_SESSION, $ilCtrl, ilObjectGUI\$lng, $tab, ilObjectGUI\$tpl, ilSkillTemplateReference\_lookupTemplateId(), ilSkillTemplateReference\_lookupTrefIdsForTemplateId(), ilSkillTreeNode\_lookupType(), ilUtil\getImagePath(), ilSkillTreeNodeFactory\getInstance(), IL_FIRST_NODE, and ilUtil\sendFailure().

356  {
357  global $lng, $tpl, $ilCtrl, $ilTabs, $ilToolbar;
358 
359  if(!isset($_POST["id"]))
360  {
361  $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
362  }
363 
364  $ilTabs->clearTargets();
365 
366  // check usages
367  $mode = "";
368  $cskill_ids = array();
369  foreach($_POST["id"] as $id)
370  {
371  if (in_array(ilSkillTreeNode::_lookupType($id), array("skll", "scat", "sktr")))
372  {
373  if ($mode == "templates")
374  {
375  $this->ilias->raiseError("Skill Deletion - type mismatch.",$this->ilias->error_obj->MESSAGE);
376  }
377  $mode = "basic";
378  $skill_id = $id;
379  $tref_id = 0;
380  if (ilSkillTreeNode::_lookupType($id) == "sktr")
381  {
382  include_once("./Services/Skill/classes/class.ilSkillTemplateReference.php");
384  $tref_id = $id;
385  }
386  $cskill_ids[] = array("skill_id" => $skill_id, "tref_id" => $tref_id);
387  }
388  if (in_array(ilSkillTreeNode::_lookupType($id), array("sktp", "sctp")))
389  {
390  if ($mode == "basic")
391  {
392  $this->ilias->raiseError("Skill Deletion - type mismatch.",$this->ilias->error_obj->MESSAGE);
393  }
394  $mode = "templates";
395 
397  {
398  $cskill_ids[] = array("skill_id" => $id, "tref_id" => $tref_id);
399  }
400  }
401  // for cats, skills and template references, get "real" usages
402  // for skill and category templates check usage in references
403  }
404 
405  if ($mode == "basic" || $mode == "templates")
406  {
407  include_once("./Services/Skill/classes/class.ilSkillUsage.php");
408  $u = new ilSkillUsage();
409  $usages = $u->getAllUsagesInfoOfSubtrees($cskill_ids);
410  if (count($usages) > 0)
411  {
412  $html = "";
413  foreach ($usages as $k => $usage)
414  {
415  include_once("./Services/Skill/classes/class.ilSkillUsageTableGUI.php");
416  $tab = new ilSkillUsageTableGUI($this, "showUsage", $k, $usage);
417  $html.= $tab->getHTML()."<br/><br/>";
418  }
419  $tpl->setContent($html);
420  $ilToolbar->addButton($lng->txt("back"),
421  $ilCtrl->getLinkTarget($a_gui, "cancelDelete"));
422  ilUtil::sendFailure($lng->txt("skmg_cannot_delete_nodes_in_use"));
423  return;
424  }
425  }
426  else
427  {
428  $this->ilias->raiseError("Skill Deletion - type mismatch.",$this->ilias->error_obj->MESSAGE);
429  }
430 
431  // SAVE POST VALUES
432  $_SESSION["saved_post"] = $_POST["id"];
433 
434  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
435  $confirmation_gui = new ilConfirmationGUI();
436 
437  $ilCtrl->setParameter($a_gui, "tmpmode", $_GET["tmpmode"]);
438  $a_form_action = $this->ctrl->getFormAction($a_gui);
439  $confirmation_gui->setFormAction($a_form_action);
440  $confirmation_gui->setHeaderText($this->lng->txt("info_delete_sure"));
441 
442  // Add items to delete
443  include_once("./Services/Skill/classes/class.ilSkillTreeNodeFactory.php");
444  foreach($_POST["id"] as $id)
445  {
446  if ($id != IL_FIRST_NODE)
447  {
448  $node_obj = ilSkillTreeNodeFactory::getInstance($id);
449  $confirmation_gui->addItem("id[]", $node_obj->getId(),
450  $node_obj->getTitle(), ilUtil::getImagePath("icon_".$node_obj->getType().".png"));
451  }
452  }
453 
454  $confirmation_gui->setCancel($lng->txt("cancel"), "cancelDelete");
455  $confirmation_gui->setConfirm($lng->txt("confirm"), "confirmedDelete");
456 
457  $tpl->setContent($confirmation_gui->getHTML());
458  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
static _lookupTrefIdsForTemplateId($a_tid)
Get all tref ids for a template id.
static _lookupType($a_obj_id)
Lookup Type.
global $ilCtrl
Definition: ilias.php:18
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
const IL_FIRST_NODE
Definition: class.ilTree.php:5
redirection script todo: (a better solution should control the processing via a xml file) ...
static _lookupTemplateId($a_obj_id)
Lookup template ID.
TableGUI class for skill usages.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
Skill usage.
Confirmation screen class.
+ Here is the call graph for this function:

◆ editSettings()

ilObjSkillManagementGUI::editSettings ( )

Edit news settings.

Definition at line 196 of file class.ilObjSkillManagementGUI.php.

References $ilCtrl, $ilSetting, ilObjectGUI\$lng, and ilCheckboxInputGUI\setValue().

197  {
198  global $ilCtrl, $lng, $ilSetting, $ilTabs;
199 
200  $ilTabs->activateTab("settings");
201 
202  include_once("./Services/Skill/classes/class.ilSkillManagementSettings.php");
203  $skmg_set = new ilSkillManagementSettings();
204  $enable_skmg = $skmg_set->isActivated();
205 
206  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
207  $form = new ilPropertyFormGUI();
208  $form->setFormAction($ilCtrl->getFormAction($this));
209  $form->setTitle($lng->txt("skmg_settings"));
210 
211  // Enable skill management
212  $cb_prop = new ilCheckboxInputGUI($lng->txt("skmg_enable_skmg"),
213  "enable_skmg");
214  $cb_prop->setValue("1");
215  $cb_prop->setChecked($enable_skmg);
216  $form->addItem($cb_prop);
217 
218  // command buttons
219  $form->addCommandButton("saveSettings", $lng->txt("save"));
220 
221  $this->tpl->setContent($form->getHTML());
222  }
This class represents a property form user interface.
This class represents a checkbox property in a property form.
global $ilCtrl
Definition: ilias.php:18
setValue($a_value)
Set Value.
global $ilSetting
Definition: privfeed.php:40
+ Here is the call graph for this function:

◆ editSkills()

ilObjSkillManagementGUI::editSkills ( )

Edit skills.

Definition at line 243 of file class.ilObjSkillManagementGUI.php.

References $ilCtrl, ilObjectGUI\$lng, and ilObjectGUI\$tpl.

244  {
245  global $tpl, $ilTabs, $lng, $ilCtrl;
246 
247  $ilTabs->activateTab("skills");
248 
249  $ilCtrl->setParameterByClass("ilobjskillmanagementgui", "obj_id", $this->skill_tree->getRootId());
250  $ilCtrl->redirectByClass("ilskillrootgui", "listSkills");
251 
252  }
global $ilCtrl
Definition: ilias.php:18

◆ editSkillTemplates()

ilObjSkillManagementGUI::editSkillTemplates ( )

Edit skill templates.

Definition at line 757 of file class.ilObjSkillManagementGUI.php.

References $ilCtrl, ilObjectGUI\$lng, and ilObjectGUI\$tpl.

758  {
759  global $tpl, $ilTabs, $lng, $ilCtrl;
760 
761  $ilTabs->activateTab("skill_templates");
762  $ilCtrl->setParameterByClass("ilobjskillmanagementgui", "obj_id", $this->skill_tree->getRootId());
763  $ilCtrl->redirectByClass("ilskillrootgui", "listTemplates");
764 
765  }
global $ilCtrl
Definition: ilias.php:18

◆ executeCommand()

ilObjSkillManagementGUI::executeCommand ( )

Execute command.

public

Definition at line 48 of file class.ilObjSkillManagementGUI.php.

References $_GET, $cmd, $ilErr, $ret, ilObjectGUI\prepareOutput(), and showTree().

49  {
50  global $rbacsystem, $ilErr, $ilAccess, $ilTabs;
51 
52  $next_class = $this->ctrl->getNextClass($this);
53  $cmd = $this->ctrl->getCmd();
54 
55  $this->prepareOutput();
56 
57  if(!$ilAccess->checkAccess('read','',$this->object->getRefId()))
58  {
59  $ilErr->raiseError($this->lng->txt('no_permission'),$ilErr->WARNING);
60  }
61 
62  switch($next_class)
63  {
64  case 'ilskillrootgui':
65  include_once("./Services/Skill/classes/class.ilSkillRootGUI.php");
66  $skrt_gui = new ilSkillRootGUI((int) $_GET["obj_id"], $this);
67  $skrt_gui->setParentGUI($this);
68  $ret = $this->ctrl->forwardCommand($skrt_gui);
69  break;
70 
71  case 'ilskillcategorygui':
72  $this->tabs_gui->activateTab("skills");
73  include_once("./Services/Skill/classes/class.ilSkillCategoryGUI.php");
74  $scat_gui = new ilSkillCategoryGUI((int) $_GET["obj_id"]);
75  $scat_gui->setParentGUI($this);
76  $this->showTree(false, $scat_gui, "listItems");
77  $ret = $this->ctrl->forwardCommand($scat_gui);
78  break;
79 
80  case 'ilbasicskillgui':
81  $this->tabs_gui->activateTab("skills");
82  include_once("./Services/Skill/classes/class.ilBasicSkillGUI.php");
83  $skill_gui = new ilBasicSkillGUI((int) $_GET["obj_id"]);
84  $skill_gui->setParentGUI($this);
85  $this->showTree(false, $skill_gui, "edit");
86  $ret = $this->ctrl->forwardCommand($skill_gui);
87  break;
88 
89  case 'ilskilltemplatecategorygui':
90  $this->tabs_gui->activateTab("skill_templates");
91  include_once("./Services/Skill/classes/class.ilSkillTemplateCategoryGUI.php");
92  $sctp_gui = new ilSkillTemplateCategoryGUI((int) $_GET["obj_id"], (int) $_GET["tref_id"]);
93  $sctp_gui->setParentGUI($this);
94  $this->showTree(((int) $_GET["tref_id"] == 0), $sctp_gui, "listItems");
95  $ret = $this->ctrl->forwardCommand($sctp_gui);
96  break;
97 
98  case 'ilbasicskilltemplategui':
99  $this->tabs_gui->activateTab("skill_templates");
100  include_once("./Services/Skill/classes/class.ilBasicSkillTemplateGUI.php");
101  $sktp_gui = new ilBasicSkillTemplateGUI((int) $_GET["obj_id"], (int) $_GET["tref_id"]);
102  $sktp_gui->setParentGUI($this);
103  $this->showTree(((int) $_GET["tref_id"] == 0), $sktp_gui, "edit");
104  $ret = $this->ctrl->forwardCommand($sktp_gui);
105  break;
106 
107  case 'ilskilltemplatereferencegui':
108  $this->tabs_gui->activateTab("skills");
109  include_once("./Services/Skill/classes/class.ilSkillTemplateReferenceGUI.php");
110  $sktr_gui = new ilSkillTemplateReferenceGUI((int) $_GET["tref_id"]);
111  $sktr_gui->setParentGUI($this);
112  $this->showTree(false, $sktr_gui, "listItems");
113  $ret = $this->ctrl->forwardCommand($sktr_gui);
114  break;
115 
116  case "ilskillprofilegui":
117  $ilTabs->activateTab("profiles");
118  include_once("./Services/Skill/classes/class.ilSkillProfileGUI.php");
119  $skprof_gui = new ilSkillProfileGUI();
120  $ret = $this->ctrl->forwardCommand($skprof_gui);
121  break;
122 
123  case 'ilpermissiongui':
124  $this->tabs_gui->activateTab('permissions');
125  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
126  $perm_gui =& new ilPermissionGUI($this);
127  $ret = $this->ctrl->forwardCommand($perm_gui);
128  break;
129 
130  default:
131  if(!$cmd || $cmd == 'view')
132  {
133  $cmd = "editSkills";
134  }
135 
136  if ($cmd == "showTree")
137  {
138  $this->showTree($_GET["templates_tree"]);
139  }
140  else
141  {
142  $this->$cmd();
143  }
144  break;
145  }
146  return true;
147  }
Skill category GUI class.
Skill root GUI class.
Skill profile GUI class.
showTree($a_templates, $a_gui="", $a_gui_cmd="")
Show Editing Tree.
$_GET["client_id"]
$cmd
Definition: sahs_server.php:35
Skill template reference GUI class.
prepareOutput()
prepare output
Skill template category GUI class.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
Basic skill GUI class.
Basic skill template GUI class.
+ Here is the call graph for this function:

◆ expandAll()

ilObjSkillManagementGUI::expandAll (   $a_redirect = true)

Expand all.

Definition at line 313 of file class.ilObjSkillManagementGUI.php.

References $_GET, $_SESSION, $n, and saveAllTitles().

314  {
315  $_GET["skexpand"] = "";
316  $n_id = ($_GET["obj_id"] > 0)
317  ? $_GET["obj_id"]
318  : $this->skill_tree->readRootId();
319  $stree = $this->skill_tree->getSubTree($this->skill_tree->getNodeData($n_id));
320  $n_arr = array();
321  foreach ($stree as $n)
322  {
323  $n_arr[] = $n["child"];
324  $_SESSION["skexpand"] = $n_arr;
325  }
326  $this->saveAllTitles(false);
327  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
$_GET["client_id"]
$n
Definition: RandomTest.php:80
saveAllTitles($a_succ_mess=true)
Save all titles of chapters/scos/pages.
+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjSkillManagementGUI::getAdminTabs ( )

Get tabs.

public

Definition at line 155 of file class.ilObjSkillManagementGUI.php.

References ilObjectGUI\$lng.

156  {
157  global $rbacsystem, $ilAccess, $lng;
158 
159  if ($rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
160  {
161  $this->tabs_gui->addTab("skills",
162  $lng->txt("skmg_skills"),
163  $this->ctrl->getLinkTarget($this, "editSkills"));
164 
165  $this->tabs_gui->addTab("skill_templates",
166  $lng->txt("skmg_skill_templates"),
167  $this->ctrl->getLinkTarget($this, "editSkillTemplates"));
168 
169  $this->tabs_gui->addTab("settings",
170  $lng->txt("settings"),
171  $this->ctrl->getLinkTarget($this, "editSettings"));
172 
173  $this->tabs_gui->addTab("profiles",
174  $lng->txt("skmg_skill_profiles"),
175  $this->ctrl->getLinkTargetByClass("ilskillprofilegui"));
176 
177  if (DEVMODE == 1)
178  {
179  $this->tabs_gui->addTab("test",
180  "Test (DEVMODE)",
181  $this->ctrl->getLinkTarget($this, "test"));
182  }
183  }
184 
185  if ($rbacsystem->checkAccess('edit_permission',$this->object->getRefId()))
186  {
187  $this->tabs_gui->addTab("permissions",
188  $lng->txt("perm_settings"),
189  $this->ctrl->getLinkTargetByClass('ilpermissiongui',"perm"));
190  }
191  }

◆ saveAllTemplateTitles()

ilObjSkillManagementGUI::saveAllTemplateTitles (   $a_succ_mess = true)

Save all titles of chapters/scos/pages.

Definition at line 285 of file class.ilObjSkillManagementGUI.php.

References $_POST, $ilCtrl, ilObjectGUI\$lng, ilSkillTreeNode\_writeTitle(), ilSkillTreeNodeFactory\getInstance(), ilUtil\sendSuccess(), and ilUtil\stripSlashes().

286  {
287  global $ilCtrl, $lng;
288 
289  if (is_array($_POST["title"]))
290  {
291  include_once("./Services/Skill/classes/class.ilSkillTreeNodeFactory.php");
292  foreach($_POST["title"] as $id => $title)
293  {
294  $node_obj = ilSkillTreeNodeFactory::getInstance($id);
295  if (is_object($node_obj))
296  {
297  // update title
299  }
300  }
301  if ($a_succ_mess)
302  {
303  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
304  }
305  }
306  $ilCtrl->redirect($this, "editSkillTemplates");
307  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
static _writeTitle($a_obj_id, $a_title)
Write Title.
global $ilCtrl
Definition: ilias.php:18
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
+ Here is the call graph for this function:

◆ saveAllTitles()

ilObjSkillManagementGUI::saveAllTitles (   $a_succ_mess = true)

Save all titles of chapters/scos/pages.

Definition at line 258 of file class.ilObjSkillManagementGUI.php.

References $_POST, $ilCtrl, ilObjectGUI\$lng, ilSkillTreeNode\_writeTitle(), ilSkillTreeNodeFactory\getInstance(), ilUtil\sendSuccess(), and ilUtil\stripSlashes().

Referenced by collapseAll(), and expandAll().

259  {
260  global $ilCtrl, $lng;
261 
262  if (is_array($_POST["title"]))
263  {
264  include_once("./Services/Skill/classes/class.ilSkillTreeNodeFactory.php");
265  foreach($_POST["title"] as $id => $title)
266  {
267  $node_obj = ilSkillTreeNodeFactory::getInstance($id);
268  if (is_object($node_obj))
269  {
270  // update title
272  }
273  }
274  if ($a_succ_mess)
275  {
276  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
277  }
278  }
279  $ilCtrl->redirect($this, "editSkills");
280  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
static _writeTitle($a_obj_id, $a_title)
Write Title.
global $ilCtrl
Definition: ilias.php:18
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveSettings()

ilObjSkillManagementGUI::saveSettings ( )

Save skill management settings.

Definition at line 227 of file class.ilObjSkillManagementGUI.php.

References $_POST, $ilCtrl, $ilSetting, and ilUtil\sendSuccess().

228  {
229  global $ilCtrl, $ilSetting;
230 
231  include_once("./Services/Skill/classes/class.ilSkillManagementSettings.php");
232  $skmg_set = new ilSkillManagementSettings();
233  $skmg_set->activate((int) $_POST["enable_skmg"]);
234 
235  ilUtil::sendSuccess($this->lng->txt("settings_saved"),true);
236 
237  $ilCtrl->redirect($this, "editSettings");
238  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
global $ilCtrl
Definition: ilias.php:18
global $ilSetting
Definition: privfeed.php:40
+ Here is the call graph for this function:

◆ setTestSubtabs()

ilObjSkillManagementGUI::setTestSubtabs (   $a_act)

Set test subtabs.

Parameters

Definition at line 726 of file class.ilObjSkillManagementGUI.php.

References $ilCtrl.

727  {
728  global $ilTabs, $ilCtrl;
729 
730  $ilTabs->addSubtab("test",
731  "getCompletionDateForTriggerRefId",
732  $ilCtrl->getLinkTarget($this, "test"));
733 
734  $ilTabs->addSubtab("cert",
735  "checkUserCertificateForTriggerRefId",
736  $ilCtrl->getLinkTarget($this, "testCert"));
737 
738  $ilTabs->addSubtab("all_cert",
739  "getTriggerOfAllCertificates",
740  $ilCtrl->getLinkTarget($this, "testAllCert"));
741 
742  $ilTabs->addSubtab("levels",
743  "getSkillLevelsForTrigger",
744  $ilCtrl->getLinkTarget($this, "testLevels"));
745 
746  $ilTabs->activateSubtab($a_act);
747 
748  }
global $ilCtrl
Definition: ilias.php:18

◆ showTree()

ilObjSkillManagementGUI::showTree (   $a_templates,
  $a_gui = "",
  $a_gui_cmd = "" 
)

Show Editing Tree.

Definition at line 774 of file class.ilObjSkillManagementGUI.php.

References $_GET, $ilCtrl, $ilUser, ilObjectGUI\$lng, $path, ilObjectGUI\$tpl, and ilSkillTreeNode\_lookupType().

Referenced by executeCommand().

775  {
776  global $ilUser, $tpl, $ilCtrl, $lng;
777 
778  if ($a_templates)
779  {
780  if ($_GET["obj_id"] == "" || $_GET["obj_id"] == 1)
781  {
782  return;
783  }
784 
785  if ($_GET["obj_id"] > 1)
786  {
787  $path = $this->skill_tree->getPathId($_GET["obj_id"]);
788  include_once("./Services/Skill/classes/class.ilSkillTreeNode.php");
789  if (ilSkillTreeNode::_lookupType($path[1]) == "sktp")
790  {
791  return;
792  }
793  }
794  }
795 
796  $ilCtrl->setParameter($this, "templates_tree", $a_templates);
797 
798  if ($a_templates)
799  {
800  include_once("./Services/Skill/classes/class.ilSkillTemplateTreeExplorerGUI.php");
801  $exp = new ilSkillTemplateTreeExplorerGUI($this, "showTree");
802  }
803  else
804  {
805  include_once("./Services/Skill/classes/class.ilSkillTreeExplorerGUI.php");
806  $exp = new ilSkillTreeExplorerGUI($this, "showTree", $a_templates);
807  }
808  if (!$exp->handleCommand())
809  {
810  $tpl->setLeftNavContent($exp->getHTML());
811  }
812  }
$_GET["client_id"]
Explorer class that works on tree objects (Services/Tree)
static _lookupType($a_obj_id)
Lookup Type.
global $ilCtrl
Definition: ilias.php:18
global $ilUser
Definition: imgupload.php:15
$path
Definition: index.php:22
Explorer class that works on tree objects (Services/Tree)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ test()

ilObjSkillManagementGUI::test ( )

Test getCompletionDateForTriggerRefId.

Parameters

Definition at line 510 of file class.ilObjSkillManagementGUI.php.

References $_POST, $ilCtrl, ilObjectGUI\$lng, $result, ilObjectGUI\$tpl, and ilBasicSkill\getCompletionDateForTriggerRefId().

511  {
512  global $tpl, $lng, $ilCtrl, $ilTabs;
513 
514  $this->setTestSubTabs("test");
515 
516  $ilTabs->activateTab("test");
517 
518  include_once("./Services/Skill/classes/class.ilBasicSkill.php");
519 
520  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
521  $this->form = new ilPropertyFormGUI();
522 
523  $this->form->addCommandButton("test", $lng->txt("execute"));
524 
525  $this->form->setTitle("getCompletionDateForTriggerRefId()");
526  $this->form->setFormAction($ilCtrl->getFormAction($this));
527 
528  // user id
529  $ti = new ilTextInputGUI("User ID(s)", "user_id");
530  $ti->setMaxLength(200);
531  $ti->setInfo("Separate multiple IDs by :");
532  $ti->setValue($_POST["user_id"]);
533  $this->form->addItem($ti);
534 
535  // ref id
536  $ti = new ilTextInputGUI("Ref ID(s)", "ref_id");
537  $ti->setMaxLength(200);
538  $ti->setInfo("Separate multiple IDs by :");
539  $ti->setValue($_POST["ref_id"]);
540  $this->form->addItem($ti);
541 
542  $result = "";
543  if (isset($_POST["user_id"]))
544  {
545  $user_ids = explode(":", $_POST["user_id"]);
546  $ref_ids = explode(":", $_POST["ref_id"]);
547  if (count($user_ids) <= 1)
548  {
549  $user_ids = $user_ids[0];
550  }
551  if (count($ref_ids) == 1)
552  {
553  $ref_ids = $ref_ids[0];
554  }
555  else if (count($ref_ids) == 0)
556  {
557  $ref_ids = null;
558  }
559 
561  $result = "<br />Result:<br />".var_export($result, true);
562  }
563 
564  $tpl->setContent($this->form->getHTML().$result);
565 
566  }
$_POST['username']
Definition: cron.php:12
$result
This class represents a property form user interface.
static getCompletionDateForTriggerRefId($a_user_id, $a_ref_id=null)
Get trigger completion.
global $ilCtrl
Definition: ilias.php:18
This class represents a text property in a property form.
+ Here is the call graph for this function:

◆ testAllCert()

ilObjSkillManagementGUI::testAllCert ( )

Test getTriggerOfAllCertificates.

Parameters

Definition at line 637 of file class.ilObjSkillManagementGUI.php.

References $_POST, $ilCtrl, ilObjectGUI\$lng, $result, ilObjectGUI\$tpl, and ilBasicSkill\getTriggerOfAllCertificates().

638  {
639  global $tpl, $lng, $ilCtrl, $ilTabs;
640 
641  $this->setTestSubTabs("all_cert");
642  $ilTabs->activateTab("test");
643 
644  include_once("./Services/Skill/classes/class.ilBasicSkill.php");
645 
646  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
647  $this->form = new ilPropertyFormGUI();
648 
649  $this->form->addCommandButton("testAllCert", $lng->txt("execute"));
650 
651  $this->form->setTitle("getTriggerOfAllCertificates()");
652  $this->form->setFormAction($ilCtrl->getFormAction($this));
653 
654  // user id
655  $ti = new ilTextInputGUI("User ID(s)", "user_id");
656  $ti->setMaxLength(200);
657  $ti->setInfo("Separate multiple IDs by :");
658  $ti->setValue($_POST["user_id"]);
659  $this->form->addItem($ti);
660 
661  $result = "";
662  if (isset($_POST["user_id"]))
663  {
664  $user_ids = explode(":", $_POST["user_id"]);
665  $ref_ids = explode(":", $_POST["ref_id"]);
666  if (count($user_ids) <= 1)
667  {
668  $user_ids = $user_ids[0];
669  }
670 
672  $result = "<br />Result:<br />".var_export($result, true);
673  }
674 
675  $tpl->setContent($this->form->getHTML().$result);
676 
677  }
$_POST['username']
Definition: cron.php:12
$result
This class represents a property form user interface.
global $ilCtrl
Definition: ilias.php:18
This class represents a text property in a property form.
static getTriggerOfAllCertificates($a_user_id)
Get trigger completion.
+ Here is the call graph for this function:

◆ testCert()

ilObjSkillManagementGUI::testCert ( )

Test checkUserCertificateForTriggerRefId.

Parameters

Definition at line 574 of file class.ilObjSkillManagementGUI.php.

References $_POST, $ilCtrl, ilObjectGUI\$lng, $result, ilObjectGUI\$tpl, and ilBasicSkill\checkUserCertificateForTriggerRefId().

575  {
576  global $tpl, $lng, $ilCtrl, $ilTabs;
577 
578  $this->setTestSubTabs("cert");
579  $ilTabs->activateTab("test");
580 
581  include_once("./Services/Skill/classes/class.ilBasicSkill.php");
582 
583  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
584  $this->form = new ilPropertyFormGUI();
585 
586  $this->form->addCommandButton("testCert", $lng->txt("execute"));
587 
588  $this->form->setTitle("checkUserCertificateForTriggerRefId()");
589  $this->form->setFormAction($ilCtrl->getFormAction($this));
590 
591  // user id
592  $ti = new ilTextInputGUI("User ID(s)", "user_id");
593  $ti->setMaxLength(200);
594  $ti->setInfo("Separate multiple IDs by :");
595  $ti->setValue($_POST["user_id"]);
596  $this->form->addItem($ti);
597 
598  // ref id
599  $ti = new ilTextInputGUI("Ref ID(s)", "ref_id");
600  $ti->setMaxLength(200);
601  $ti->setInfo("Separate multiple IDs by :");
602  $ti->setValue($_POST["ref_id"]);
603  $this->form->addItem($ti);
604 
605  $result = "";
606  if (isset($_POST["user_id"]))
607  {
608  $user_ids = explode(":", $_POST["user_id"]);
609  $ref_ids = explode(":", $_POST["ref_id"]);
610  if (count($user_ids) <= 1)
611  {
612  $user_ids = $user_ids[0];
613  }
614  if (count($ref_ids) == 1)
615  {
616  $ref_ids = $ref_ids[0];
617  }
618  else if (count($ref_ids) == 0)
619  {
620  $ref_ids = null;
621  }
622 
624  $result = "<br />Result:<br />".var_export($result, true);
625  }
626 
627  $tpl->setContent($this->form->getHTML().$result);
628 
629  }
$_POST['username']
Definition: cron.php:12
$result
This class represents a property form user interface.
static checkUserCertificateForTriggerRefId($a_user_id, $a_ref_id)
Get trigger completion.
global $ilCtrl
Definition: ilias.php:18
This class represents a text property in a property form.
+ Here is the call graph for this function:

◆ testLevels()

ilObjSkillManagementGUI::testLevels ( )

Test getSkillLevelsForTrigger.

Parameters

Definition at line 685 of file class.ilObjSkillManagementGUI.php.

References $_POST, $ilCtrl, ilObjectGUI\$lng, $result, ilObjectGUI\$tpl, and ilBasicSkill\getSkillLevelsForTrigger().

686  {
687  global $tpl, $lng, $ilCtrl, $ilTabs;
688 
689  $this->setTestSubTabs("levels");
690  $ilTabs->activateTab("test");
691 
692  include_once("./Services/Skill/classes/class.ilBasicSkill.php");
693 
694  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
695  $this->form = new ilPropertyFormGUI();
696 
697  $this->form->addCommandButton("testLevels", $lng->txt("execute"));
698 
699  $this->form->setTitle("getTriggerOfAllCertificates()");
700  $this->form->setFormAction($ilCtrl->getFormAction($this));
701 
702  // user id
703  $ti = new ilTextInputGUI("Ref ID", "ref_id");
704  $ti->setMaxLength(200);
705  $ti->setValue($_POST["ref_id"]);
706  $this->form->addItem($ti);
707 
708  $result = "";
709  if (isset($_POST["ref_id"]))
710  {
712  $result = "<br />Result:<br />".var_export($result, true);
713  }
714 
715  $tpl->setContent($this->form->getHTML().$result);
716 
717  }
$_POST['username']
Definition: cron.php:12
$result
This class represents a property form user interface.
global $ilCtrl
Definition: ilias.php:18
This class represents a text property in a property form.
static getSkillLevelsForTrigger($a_ref_id)
Get assigned skill levels for trigger.
+ Here is the call graph for this function:

Field Documentation

◆ $skill_tree

ilObjSkillManagementGUI::$skill_tree
protected

Definition at line 20 of file class.ilObjSkillManagementGUI.php.


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