ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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
 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...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 getAdminTabs ()
 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 ()
 cancel action and go back to previous page @access 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...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 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
 
- Protected Attributes inherited from ilObjectGUI
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 

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 ()
 
 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 @access public More...
 
 setAdminTabs ()
 set admin tabs @access 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...
 
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput()) 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, $a_catch_errors=true)
 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...
 
 getTabs ()
 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 (ilColumnGUI $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

Skill management main GUI class.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

@ilCtrl_Calls ilObjSkillManagementGUI: ilPermissionGUI, ilSkillProfileGUI, ilExportGUI @ilCtrl_isCalledBy ilObjSkillManagementGUI: ilAdministrationGUI

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

Constructor & Destructor Documentation

◆ __construct()

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

Contructor.

@access public

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

28 {
29 global $ilCtrl;
30
31 $this->type = 'skmg';
32 parent::__construct($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 }
global $ilCtrl
Definition: ilias.php:18

References $ilCtrl.

Member Function Documentation

◆ cancelDelete()

ilObjSkillManagementGUI::cancelDelete ( )

cancel delete

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

489 {
490 $this->ctrl->redirect($this, "editSkills");
491 }

◆ collapseAll()

ilObjSkillManagementGUI::collapseAll (   $a_redirect = true)

Collapse all.

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

357 {
358 $_GET["skexpand"] = "";
359 $n_id = ($_GET["obj_id"] > 0)
360 ? $_GET["obj_id"]
361 : $this->skill_tree->readRootId();
362 $stree = $this->skill_tree->getSubTree($this->skill_tree->getNodeData($n_id));
363 $old = $_SESSION["skexpand"];
364 foreach ($stree as $n)
365 {
366 if (in_array($n["child"], $old) && $n["child"] != $n_id)
367 {
368 $k = array_search($n["child"], $old);
369 unset($old[$k]);
370 }
371 }
372 $_SESSION["skexpand"] = $old;
373 $this->saveAllTitles(false);
374 }
$n
Definition: RandomTest.php:80
$_GET["client_id"]
$_SESSION["AccountId"]
saveAllTitles($a_succ_mess=true)
Save all titles of chapters/scos/pages.
$old

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

+ Here is the call graph for this function:

◆ confirmedDelete()

ilObjSkillManagementGUI::confirmedDelete ( )

Delete chapters/scos/pages.

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

497 {
498 global $ilCtrl;
499
500 // delete all selected objects
501 include_once("./Services/Skill/classes/class.ilSkillTreeNodeFactory.php");
502 foreach ($_POST["id"] as $id)
503 {
504 if ($id != IL_FIRST_NODE)
505 {
507 $node_data = $this->skill_tree->getNodeData($id);
508 if (is_object($obj))
509 {
510 $obj->delete();
511 }
512 if($this->skill_tree->isInTree($id))
513 {
514 $this->skill_tree->deleteTree($node_data);
515 }
516 }
517 }
518
519 // feedback
520 ilUtil::sendInfo($this->lng->txt("info_deleted"),true);
521 }
$_POST["username"]
const IL_FIRST_NODE
Definition: class.ilTree.php:5
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.

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

+ Here is the call graph for this function:

◆ deleteNodes()

ilObjSkillManagementGUI::deleteNodes (   $a_gui)

confirm deletion screen of skill tree nodes

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

380 {
381 global $lng, $tpl, $ilCtrl, $ilTabs, $ilToolbar;
382
383 if(!isset($_POST["id"]))
384 {
385 $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
386 }
387
388 $ilTabs->clearTargets();
389
390 // check usages
391 $mode = "";
392 $cskill_ids = array();
393 foreach($_POST["id"] as $id)
394 {
395 if (in_array(ilSkillTreeNode::_lookupType($id), array("skll", "scat", "sktr")))
396 {
397 if ($mode == "templates")
398 {
399 $this->ilias->raiseError("Skill Deletion - type mismatch.",$this->ilias->error_obj->MESSAGE);
400 }
401 $mode = "basic";
402 $skill_id = $id;
403 $tref_id = 0;
404 if (ilSkillTreeNode::_lookupType($id) == "sktr")
405 {
406 include_once("./Services/Skill/classes/class.ilSkillTemplateReference.php");
408 $tref_id = $id;
409 }
410 $cskill_ids[] = array("skill_id" => $skill_id, "tref_id" => $tref_id);
411 }
412 if (in_array(ilSkillTreeNode::_lookupType($id), array("sktp", "sctp")))
413 {
414 if ($mode == "basic")
415 {
416 $this->ilias->raiseError("Skill Deletion - type mismatch.",$this->ilias->error_obj->MESSAGE);
417 }
418 $mode = "templates";
419
421 {
422 $cskill_ids[] = array("skill_id" => $id, "tref_id" => $tref_id);
423 }
424 }
425 // for cats, skills and template references, get "real" usages
426 // for skill and category templates check usage in references
427 }
428
429 if ($mode == "basic" || $mode == "templates")
430 {
431 include_once("./Services/Skill/classes/class.ilSkillUsage.php");
432 $u = new ilSkillUsage();
433 $usages = $u->getAllUsagesInfoOfSubtrees($cskill_ids);
434 if (count($usages) > 0)
435 {
436 $html = "";
437 foreach ($usages as $k => $usage)
438 {
439 include_once("./Services/Skill/classes/class.ilSkillUsageTableGUI.php");
440 $tab = new ilSkillUsageTableGUI($this, "showUsage", $k, $usage);
441 $html.= $tab->getHTML()."<br/><br/>";
442 }
443 $tpl->setContent($html);
444 $ilCtrl->saveParameter($a_gui, "tmpmode");
445 $ilToolbar->addButton($lng->txt("back"),
446 $ilCtrl->getLinkTarget($a_gui, "cancelDelete"));
447 ilUtil::sendFailure($lng->txt("skmg_cannot_delete_nodes_in_use"));
448 return;
449 }
450 }
451 else
452 {
453 $this->ilias->raiseError("Skill Deletion - type mismatch.",$this->ilias->error_obj->MESSAGE);
454 }
455
456 // SAVE POST VALUES
457 $_SESSION["saved_post"] = $_POST["id"];
458
459 include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
460 $confirmation_gui = new ilConfirmationGUI();
461
462 $ilCtrl->setParameter($a_gui, "tmpmode", $_GET["tmpmode"]);
463 $a_form_action = $this->ctrl->getFormAction($a_gui);
464 $confirmation_gui->setFormAction($a_form_action);
465 $confirmation_gui->setHeaderText($this->lng->txt("info_delete_sure"));
466
467 // Add items to delete
468 include_once("./Services/Skill/classes/class.ilSkillTreeNodeFactory.php");
469 foreach($_POST["id"] as $id)
470 {
471 if ($id != IL_FIRST_NODE)
472 {
474 $confirmation_gui->addItem("id[]", $node_obj->getId(),
475 $node_obj->getTitle(), ilUtil::getImagePath("icon_".$node_obj->getType().".svg"));
476 }
477 }
478
479 $confirmation_gui->setCancel($lng->txt("cancel"), "cancelDelete");
480 $confirmation_gui->setConfirm($lng->txt("confirm"), "confirmedDelete");
481
482 $tpl->setContent($confirmation_gui->getHTML());
483 }
Confirmation screen class.
static _lookupTrefIdsForTemplateId($a_tid)
Get all tref ids for a template id.
static _lookupTemplateId($a_obj_id)
Lookup template ID.
static _lookupType($a_obj_id)
Lookup Type.
TableGUI class for skill usages.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
$html
Definition: example_001.php:87
redirection script todo: (a better solution should control the processing via a xml file)

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

+ Here is the call graph for this function:

◆ editSettings()

ilObjSkillManagementGUI::editSettings ( )

Edit news settings.

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

213 {
214 global $ilCtrl, $lng, $ilSetting, $ilTabs;
215
216 $ilTabs->activateTab("settings");
217
218 include_once("./Services/Skill/classes/class.ilSkillManagementSettings.php");
219 $skmg_set = new ilSkillManagementSettings();
220 $enable_skmg = $skmg_set->isActivated();
221
222 include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
223 $form = new ilPropertyFormGUI();
224 $form->setFormAction($ilCtrl->getFormAction($this));
225 $form->setTitle($lng->txt("skmg_settings"));
226
227 // Enable skill management
228 $cb_prop = new ilCheckboxInputGUI($lng->txt("skmg_enable_skmg"),
229 "enable_skmg");
230 $cb_prop->setValue("1");
231 $cb_prop->setChecked($enable_skmg);
232 $form->addItem($cb_prop);
233
234 // command buttons
235 if ($this->checkPermissionBool("write"))
236 {
237 $form->addCommandButton("saveSettings", $lng->txt("save"));
238 }
239
240 $this->tpl->setContent($form->getHTML());
241 }
This class represents a checkbox property in a property form.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
This class represents a property form user interface.
global $ilSetting
Definition: privfeed.php:17

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

+ Here is the call graph for this function:

◆ editSkills()

ilObjSkillManagementGUI::editSkills ( )

Edit skills.

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

268 {
269 global $tpl, $ilTabs, $lng, $ilCtrl;
270
271 $ilTabs->activateTab("skills");
272
273 $ilCtrl->setParameterByClass("ilobjskillmanagementgui", "obj_id", $this->skill_tree->getRootId());
274 $ilCtrl->redirectByClass("ilskillrootgui", "listSkills");
275
276 }

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

◆ editSkillTemplates()

ilObjSkillManagementGUI::editSkillTemplates ( )

Edit skill templates.

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

783 {
784 global $tpl, $ilTabs, $lng, $ilCtrl;
785
786 $ilTabs->activateTab("skill_templates");
787 $ilCtrl->setParameterByClass("ilobjskillmanagementgui", "obj_id", $this->skill_tree->getRootId());
788 $ilCtrl->redirectByClass("ilskillrootgui", "listTemplates");
789
790 }

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

◆ executeCommand()

ilObjSkillManagementGUI::executeCommand ( )

Execute command.

@access public

Reimplemented from ilObjectGUI.

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

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 case "ilexportgui":
131 $this->tabs_gui->activateTab('export');
132 include_once("./Services/Export/classes/class.ilExportGUI.php");
133 $exp_gui = new ilExportGUI($this);
134 $exp_gui->addFormat("xml");
135 //$exp_gui->addFormat("html", "", $this, "exportHTML");
136 $ret = $this->ctrl->forwardCommand($exp_gui);
137 break;
138
139 default:
140 if(!$cmd || $cmd == 'view')
141 {
142 $cmd = "editSkills";
143 }
144
145 if ($cmd == "showTree")
146 {
147 $this->showTree($_GET["templates_tree"]);
148 }
149 else
150 {
151 $this->$cmd();
152 }
153 break;
154 }
155 return true;
156 }
Basic skill GUI class.
Basic skill template GUI class.
Export User Interface Class.
showTree($a_templates, $a_gui="", $a_gui_cmd="")
Show Editing Tree.
prepareOutput($a_show_subobjects=true)
prepare output
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
Skill category GUI class.
Skill profile GUI class.
Skill root GUI class.
Skill template category GUI class.
Skill template reference GUI class.
$ret
Definition: parser.php:6
global $ilErr
Definition: raiseError.php:16
$cmd
Definition: sahs_server.php:35

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

+ Here is the call graph for this function:

◆ expandAll()

ilObjSkillManagementGUI::expandAll (   $a_redirect = true)

Expand all.

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

338 {
339 $_GET["skexpand"] = "";
340 $n_id = ($_GET["obj_id"] > 0)
341 ? $_GET["obj_id"]
342 : $this->skill_tree->readRootId();
343 $stree = $this->skill_tree->getSubTree($this->skill_tree->getNodeData($n_id));
344 $n_arr = array();
345 foreach ($stree as $n)
346 {
347 $n_arr[] = $n["child"];
348 $_SESSION["skexpand"] = $n_arr;
349 }
350 $this->saveAllTitles(false);
351 }

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

+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjSkillManagementGUI::getAdminTabs ( )

Get tabs.

@access public

Reimplemented from ilObjectGUI.

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

165 {
166 global $rbacsystem, $ilAccess, $lng;
167
168 if ($rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
169 {
170 $this->tabs_gui->addTab("skills",
171 $lng->txt("skmg_skills"),
172 $this->ctrl->getLinkTarget($this, "editSkills"));
173
174 $this->tabs_gui->addTab("skill_templates",
175 $lng->txt("skmg_skill_templates"),
176 $this->ctrl->getLinkTarget($this, "editSkillTemplates"));
177
178 $this->tabs_gui->addTab("settings",
179 $lng->txt("settings"),
180 $this->ctrl->getLinkTarget($this, "editSettings"));
181
182 $this->tabs_gui->addTab("profiles",
183 $lng->txt("skmg_skill_profiles"),
184 $this->ctrl->getLinkTargetByClass("ilskillprofilegui"));
185
186 if ($ilAccess->checkAccess("write", "", $this->object->getRefId()))
187 {
188 $this->tabs_gui->addTab("export",
189 $lng->txt("export"),
190 $this->ctrl->getLinkTargetByClass("ilexportgui", ""));
191 }
192
193 if (DEVMODE == 1)
194 {
195 $this->tabs_gui->addTab("test",
196 "Test (DEVMODE)",
197 $this->ctrl->getLinkTarget($this, "test"));
198 }
199 }
200
201 if ($rbacsystem->checkAccess('edit_permission',$this->object->getRefId()))
202 {
203 $this->tabs_gui->addTab("permissions",
204 $lng->txt("perm_settings"),
205 $this->ctrl->getLinkTargetByClass('ilpermissiongui',"perm"));
206 }
207 }

References ilObjectGUI\$lng.

◆ saveAllTemplateTitles()

ilObjSkillManagementGUI::saveAllTemplateTitles (   $a_succ_mess = true)

Save all titles of chapters/scos/pages.

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

310 {
311 global $ilCtrl, $lng;
312
313 if (is_array($_POST["title"]))
314 {
315 include_once("./Services/Skill/classes/class.ilSkillTreeNodeFactory.php");
316 foreach($_POST["title"] as $id => $title)
317 {
319 if (is_object($node_obj))
320 {
321 // update title
323 }
324 }
325 if ($a_succ_mess)
326 {
327 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
328 }
329 }
330 $ilCtrl->redirect($this, "editSkillTemplates");
331 }
static _writeTitle($a_obj_id, $a_title)
Write Title.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled

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

+ 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 282 of file class.ilObjSkillManagementGUI.php.

283 {
284 global $ilCtrl, $lng;
285
286 if (is_array($_POST["title"]))
287 {
288 include_once("./Services/Skill/classes/class.ilSkillTreeNodeFactory.php");
289 foreach($_POST["title"] as $id => $title)
290 {
292 if (is_object($node_obj))
293 {
294 // update title
296 }
297 }
298 if ($a_succ_mess)
299 {
300 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
301 }
302 }
303 $ilCtrl->redirect($this, "editSkills");
304 }

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

Referenced by collapseAll(), and expandAll().

+ 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 246 of file class.ilObjSkillManagementGUI.php.

247 {
248 global $ilCtrl, $ilSetting;
249
250 if (!$this->checkPermissionBool("write"))
251 {
252 return;
253 }
254
255 include_once("./Services/Skill/classes/class.ilSkillManagementSettings.php");
256 $skmg_set = new ilSkillManagementSettings();
257 $skmg_set->activate((int) $_POST["enable_skmg"]);
258
259 ilUtil::sendSuccess($this->lng->txt("settings_saved"),true);
260
261 $ilCtrl->redirect($this, "editSettings");
262 }

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

+ Here is the call graph for this function:

◆ setTestSubtabs()

ilObjSkillManagementGUI::setTestSubtabs (   $a_act)

Set test subtabs.

Parameters

return

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

752 {
753 global $ilTabs, $ilCtrl;
754
755 $ilTabs->addSubtab("test",
756 "getCompletionDateForTriggerRefId",
757 $ilCtrl->getLinkTarget($this, "test"));
758
759 $ilTabs->addSubtab("cert",
760 "checkUserCertificateForTriggerRefId",
761 $ilCtrl->getLinkTarget($this, "testCert"));
762
763 $ilTabs->addSubtab("all_cert",
764 "getTriggerOfAllCertificates",
765 $ilCtrl->getLinkTarget($this, "testAllCert"));
766
767 $ilTabs->addSubtab("levels",
768 "getSkillLevelsForTrigger",
769 $ilCtrl->getLinkTarget($this, "testLevels"));
770
771 $ilTabs->activateSubtab($a_act);
772
773 }

References $ilCtrl.

◆ showTree()

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

Show Editing Tree.

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

800 {
801 global $ilUser, $tpl, $ilCtrl, $lng;
802
803 if ($a_templates)
804 {
805 if ($_GET["obj_id"] == "" || $_GET["obj_id"] == 1)
806 {
807 return;
808 }
809
810 if ($_GET["obj_id"] > 1)
811 {
812 $path = $this->skill_tree->getPathId($_GET["obj_id"]);
813 include_once("./Services/Skill/classes/class.ilSkillTreeNode.php");
814 if (ilSkillTreeNode::_lookupType($path[1]) == "sktp")
815 {
816 return;
817 }
818 }
819 }
820
821 $ilCtrl->setParameter($this, "templates_tree", $a_templates);
822
823 if ($a_templates)
824 {
825 include_once("./Services/Skill/classes/class.ilSkillTemplateTreeExplorerGUI.php");
826 $exp = new ilSkillTemplateTreeExplorerGUI($this, "showTree");
827 }
828 else
829 {
830 include_once("./Services/Skill/classes/class.ilSkillTreeExplorerGUI.php");
831 $exp = new ilSkillTreeExplorerGUI($this, "showTree", $a_templates);
832 }
833 if (!$exp->handleCommand())
834 {
835 $tpl->setLeftNavContent($exp->getHTML());
836 }
837 }
$path
Definition: aliased.php:25
Explorer class that works on tree objects (Services/Tree)
Explorer class that works on tree objects (Services/Tree)
$ilUser
Definition: imgupload.php:18

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

Referenced by executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ test()

ilObjSkillManagementGUI::test ( )

Test getCompletionDateForTriggerRefId.

Parameters

return

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

536 {
537 global $tpl, $lng, $ilCtrl, $ilTabs;
538
539 $this->setTestSubTabs("test");
540
541 $ilTabs->activateTab("test");
542
543 include_once("./Services/Skill/classes/class.ilBasicSkill.php");
544
545 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
546 $this->form = new ilPropertyFormGUI();
547
548 $this->form->addCommandButton("test", $lng->txt("execute"));
549
550 $this->form->setTitle("getCompletionDateForTriggerRefId()");
551 $this->form->setFormAction($ilCtrl->getFormAction($this));
552
553 // user id
554 $ti = new ilTextInputGUI("User ID(s)", "user_id");
555 $ti->setMaxLength(200);
556 $ti->setInfo("Separate multiple IDs by :");
557 $ti->setValue($_POST["user_id"]);
558 $this->form->addItem($ti);
559
560 // ref id
561 $ti = new ilTextInputGUI("Ref ID(s)", "ref_id");
562 $ti->setMaxLength(200);
563 $ti->setInfo("Separate multiple IDs by :");
564 $ti->setValue($_POST["ref_id"]);
565 $this->form->addItem($ti);
566
567 $result = "";
568 if (isset($_POST["user_id"]))
569 {
570 $user_ids = explode(":", $_POST["user_id"]);
571 $ref_ids = explode(":", $_POST["ref_id"]);
572 if (count($user_ids) <= 1)
573 {
574 $user_ids = $user_ids[0];
575 }
576 if (count($ref_ids) == 1)
577 {
578 $ref_ids = $ref_ids[0];
579 }
580 else if (count($ref_ids) == 0)
581 {
582 $ref_ids = null;
583 }
584
585 $result = ilBasicSkill::getCompletionDateForTriggerRefId($user_ids, $ref_ids);
586 $result = "<br />Result:<br />".var_export($result, true);
587 }
588
589 $tpl->setContent($this->form->getHTML().$result);
590
591 }
$result
This class represents a text property in a property form.

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

◆ testAllCert()

ilObjSkillManagementGUI::testAllCert ( )

Test getTriggerOfAllCertificates.

Parameters

return

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

663 {
664 global $tpl, $lng, $ilCtrl, $ilTabs;
665
666 $this->setTestSubTabs("all_cert");
667 $ilTabs->activateTab("test");
668
669 include_once("./Services/Skill/classes/class.ilBasicSkill.php");
670
671 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
672 $this->form = new ilPropertyFormGUI();
673
674 $this->form->addCommandButton("testAllCert", $lng->txt("execute"));
675
676 $this->form->setTitle("getTriggerOfAllCertificates()");
677 $this->form->setFormAction($ilCtrl->getFormAction($this));
678
679 // user id
680 $ti = new ilTextInputGUI("User ID(s)", "user_id");
681 $ti->setMaxLength(200);
682 $ti->setInfo("Separate multiple IDs by :");
683 $ti->setValue($_POST["user_id"]);
684 $this->form->addItem($ti);
685
686 $result = "";
687 if (isset($_POST["user_id"]))
688 {
689 $user_ids = explode(":", $_POST["user_id"]);
690 $ref_ids = explode(":", $_POST["ref_id"]);
691 if (count($user_ids) <= 1)
692 {
693 $user_ids = $user_ids[0];
694 }
695
696 $result = ilBasicSkill::getTriggerOfAllCertificates($user_ids);
697 $result = "<br />Result:<br />".var_export($result, true);
698 }
699
700 $tpl->setContent($this->form->getHTML().$result);
701
702 }

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

◆ testCert()

ilObjSkillManagementGUI::testCert ( )

Test checkUserCertificateForTriggerRefId.

Parameters

return

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

600 {
601 global $tpl, $lng, $ilCtrl, $ilTabs;
602
603 $this->setTestSubTabs("cert");
604 $ilTabs->activateTab("test");
605
606 include_once("./Services/Skill/classes/class.ilBasicSkill.php");
607
608 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
609 $this->form = new ilPropertyFormGUI();
610
611 $this->form->addCommandButton("testCert", $lng->txt("execute"));
612
613 $this->form->setTitle("checkUserCertificateForTriggerRefId()");
614 $this->form->setFormAction($ilCtrl->getFormAction($this));
615
616 // user id
617 $ti = new ilTextInputGUI("User ID(s)", "user_id");
618 $ti->setMaxLength(200);
619 $ti->setInfo("Separate multiple IDs by :");
620 $ti->setValue($_POST["user_id"]);
621 $this->form->addItem($ti);
622
623 // ref id
624 $ti = new ilTextInputGUI("Ref ID(s)", "ref_id");
625 $ti->setMaxLength(200);
626 $ti->setInfo("Separate multiple IDs by :");
627 $ti->setValue($_POST["ref_id"]);
628 $this->form->addItem($ti);
629
630 $result = "";
631 if (isset($_POST["user_id"]))
632 {
633 $user_ids = explode(":", $_POST["user_id"]);
634 $ref_ids = explode(":", $_POST["ref_id"]);
635 if (count($user_ids) <= 1)
636 {
637 $user_ids = $user_ids[0];
638 }
639 if (count($ref_ids) == 1)
640 {
641 $ref_ids = $ref_ids[0];
642 }
643 else if (count($ref_ids) == 0)
644 {
645 $ref_ids = null;
646 }
647
648 $result = ilBasicSkill::checkUserCertificateForTriggerRefId($user_ids, $ref_ids);
649 $result = "<br />Result:<br />".var_export($result, true);
650 }
651
652 $tpl->setContent($this->form->getHTML().$result);
653
654 }

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

◆ testLevels()

ilObjSkillManagementGUI::testLevels ( )

Test getSkillLevelsForTrigger.

Parameters

return

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

711 {
712 global $tpl, $lng, $ilCtrl, $ilTabs;
713
714 $this->setTestSubTabs("levels");
715 $ilTabs->activateTab("test");
716
717 include_once("./Services/Skill/classes/class.ilBasicSkill.php");
718
719 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
720 $this->form = new ilPropertyFormGUI();
721
722 $this->form->addCommandButton("testLevels", $lng->txt("execute"));
723
724 $this->form->setTitle("getTriggerOfAllCertificates()");
725 $this->form->setFormAction($ilCtrl->getFormAction($this));
726
727 // user id
728 $ti = new ilTextInputGUI("Ref ID", "ref_id");
729 $ti->setMaxLength(200);
730 $ti->setValue($_POST["ref_id"]);
731 $this->form->addItem($ti);
732
733 $result = "";
734 if (isset($_POST["ref_id"]))
735 {
736 $result = ilBasicSkill::getSkillLevelsForTrigger($_POST["ref_id"]);
737 $result = "<br />Result:<br />".var_export($result, true);
738 }
739
740 $tpl->setContent($this->form->getHTML().$result);
741
742 }

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

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: