ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilSkillTreeNodeGUI Class Reference

Basic GUI class for skill tree nodes. More...

+ Inheritance diagram for ilSkillTreeNodeGUI:
+ Collaboration diagram for ilSkillTreeNodeGUI:

Public Member Functions

 __construct ($a_node_id=0)
 constructor More...
 
 isInUse ()
 Is in use? More...
 
 checkPermissionBool ($a_perm)
 Check permission pool. More...
 
 setParentGUI ($a_parentgui)
 Set Parent GUI class. More...
 
 getParentGUI ()
 Get Parent GUI class (ilObjSCORM2004LearningModuleGUI). More...
 
 readNodeObject ($a_node_id)
 Get node object instance. More...
 
 saveAllTitles ()
 Save Titles. More...
 
 deleteNodes ()
 Delete nodes in the hierarchy. More...
 
 cutItems ()
 Copy items to clipboard, then cut them from the current tree. More...
 
 copyItems ()
 Copy items to clipboard. More...
 
 cancelDelete ()
 cancel delete More...
 
 confirmedDelete ()
 confirmed delete More...
 
 setLocator ()
 Set Locator Items. More...
 
 setSkillNodeDescription ()
 Set skill node description. More...
 
 create ()
 Create skill tree node. More...
 
 addStatusInput (ilPropertyFormGUI $a_form)
 Add status input. More...
 
 editProperties ()
 Edit properties form. More...
 
 getPropertyValues ()
 Get property values for edit form. More...
 
 save ()
 Save skill tree node. More...
 
 afterSave ()
 After saving. More...
 
 update ()
 Update skill tree node. More...
 
 afterUpdate ()
 After update. More...
 
 initForm ($a_mode="edit")
 Init form. More...
 
 cancelSave ()
 Cancel saving. More...
 
 redirectToParent ($a_tmp_mode=false)
 Redirect to parent (identified by current obj_id) More...
 
 saveOrder ()
 Save order. More...
 
 insertBasicSkillClip ()
 Insert basic skills from clipboard. More...
 
 insertSkillCategoryClip ()
 Insert skill categories from clipboard. More...
 
 insertTemplateReferenceClip ()
 Insert skill template references from clipboard. More...
 
 insertSkillTemplateClip ()
 Insert skill template from clipboard. More...
 
 insertTemplateCategoryClip ()
 Insert skill template category from clipboard. More...
 
 setTitleIcon ()
 Set title icon. More...
 
 addUsageTab ($a_tabs)
 Add usage tab. More...
 
 showUsage ()
 Show skill usage. More...
 
 exportSelectedNodes ()
 Export seleced nodes. More...
 

Data Fields

 $node_object
 
 $in_use = false
 
 $use_checked = false
 
 $access
 
 $ref_id
 

Detailed Description

Basic GUI class for skill tree nodes.

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

Definition at line 15 of file class.ilSkillTreeNodeGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilSkillTreeNodeGUI::__construct (   $a_node_id = 0)

constructor

Parameters
object$a_content_objnode object

Reimplemented in ilBasicSkillGUI, ilSkillCategoryGUI, ilSkillRootGUI, ilSkillTemplateGUI, and ilSkillTemplateReferenceGUI.

Definition at line 34 of file class.ilSkillTreeNodeGUI.php.

35 {
36 global $ilAccess;
37
38 $this->node_object = null;
39 $this->access = $ilAccess;
40 $this->ref_id = (int) $_GET["ref_id"];
41
42 if ($a_node_id > 0 &&
43 $this->getType() == ilSkillTreeNode::_lookupType($a_node_id))
44 {
45 $this->readNodeObject((int) $a_node_id);
46 }
47 }
$_GET["client_id"]
readNodeObject($a_node_id)
Get node object instance.
static _lookupType($a_obj_id)
Lookup Type.

References $_GET, ilSkillTreeNode\_lookupType(), and readNodeObject().

+ Here is the call graph for this function:

Member Function Documentation

◆ addStatusInput()

ilSkillTreeNodeGUI::addStatusInput ( ilPropertyFormGUI  $a_form)

Add status input.

Parameters
ilPropertyFormGUI$a_formform

Definition at line 347 of file class.ilSkillTreeNodeGUI.php.

348 {
349 global $lng;
350
351 // status
352 $radg = new ilRadioGroupInputGUI($lng->txt("skmg_status"), "status");
353 foreach (ilSkillTreeNode::getAllStatus() as $k => $op)
354 {
355 $op = new ilRadioOption($op, $k, ilSkillTreeNode::getStatusInfo($k));
356 $radg->addOption($op);
357 }
358 $a_form->addItem($radg);
359 }
addItem($a_item)
Add Item (Property, SectionHeader).
This class represents a property in a property form.
This class represents an option in a radio group.
static getStatusInfo($a_status)
Get status info.
static getAllStatus()
Get all status.
global $lng
Definition: privfeed.php:17

References $lng, ilPropertyFormGUI\addItem(), ilSkillTreeNode\getAllStatus(), and ilSkillTreeNode\getStatusInfo().

Referenced by ilBasicSkillGUI\initForm(), ilSkillCategoryGUI\initForm(), and ilSkillTemplateReferenceGUI\initForm().

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

◆ addUsageTab()

ilSkillTreeNodeGUI::addUsageTab (   $a_tabs)

Add usage tab.

Parameters

return

Definition at line 673 of file class.ilSkillTreeNodeGUI.php.

674 {
675 global $lng, $ilCtrl;
676
677 $a_tabs->addTab("usage",
678 $lng->txt("skmg_usage"),
679 $ilCtrl->getLinkTarget($this, "showUsage"));
680 }
global $ilCtrl
Definition: ilias.php:18

References $ilCtrl, and $lng.

Referenced by ilSkillCategoryGUI\setTabs(), ilSkillTemplateCategoryGUI\setTabs(), ilBasicSkillTemplateGUI\setTabs(), ilSkillTemplateReferenceGUI\setTabs(), and ilBasicSkillGUI\setTabs().

+ Here is the caller graph for this function:

◆ afterSave()

ilSkillTreeNodeGUI::afterSave ( )

After saving.

Reimplemented in ilBasicSkillGUI, ilBasicSkillTemplateGUI, ilSkillTemplateCategoryGUI, and ilSkillTemplateReferenceGUI.

Definition at line 425 of file class.ilSkillTreeNodeGUI.php.

426 {
427 $this->redirectToParent();
428 }
redirectToParent($a_tmp_mode=false)
Redirect to parent (identified by current obj_id)

References redirectToParent().

Referenced by save().

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

◆ afterUpdate()

ilSkillTreeNodeGUI::afterUpdate ( )

After update.

Definition at line 461 of file class.ilSkillTreeNodeGUI.php.

462 {
463 global $ilCtrl;
464
465 $ilCtrl->redirect($this, "editProperties");
466 }

References $ilCtrl.

Referenced by update().

+ Here is the caller graph for this function:

◆ cancelDelete()

ilSkillTreeNodeGUI::cancelDelete ( )

cancel delete

Reimplemented in ilSkillRootGUI.

Definition at line 234 of file class.ilSkillTreeNodeGUI.php.

235 {
236 global $ilCtrl;
237
238 $this->redirectToParent();
239 }

References $ilCtrl, and redirectToParent().

+ Here is the call graph for this function:

◆ cancelSave()

ilSkillTreeNodeGUI::cancelSave ( )

Cancel saving.

Parameters

return

Definition at line 520 of file class.ilSkillTreeNodeGUI.php.

521 {
522 $this->redirectToParent();
523 }

References redirectToParent().

+ Here is the call graph for this function:

◆ checkPermissionBool()

◆ confirmedDelete()

ilSkillTreeNodeGUI::confirmedDelete ( )

confirmed delete

Definition at line 244 of file class.ilSkillTreeNodeGUI.php.

245 {
246 global $ilCtrl;
247
248 if (!$this->checkPermissionBool("write"))
249 {
250 return;
251 }
252
253 $this->getParentGUI()->confirmedDelete(false);
254 ilSkillTreeNode::saveChildsOrder((int) $_GET["obj_id"], array(),
255 $_GET["tmpmode"]);
256
257 $this->redirectToParent();
258 }
getParentGUI()
Get Parent GUI class (ilObjSCORM2004LearningModuleGUI).
checkPermissionBool($a_perm)
Check permission pool.
static saveChildsOrder($a_par_id, $a_childs_order, $a_templates=false)
Save childs order.

References $_GET, $ilCtrl, checkPermissionBool(), getParentGUI(), redirectToParent(), and ilSkillTreeNode\saveChildsOrder().

+ Here is the call graph for this function:

◆ copyItems()

ilSkillTreeNodeGUI::copyItems ( )

Copy items to clipboard.

Definition at line 192 of file class.ilSkillTreeNodeGUI.php.

193 {
194 global $ilCtrl, $lng;
195
196 if (!is_array($_POST["id"]) || count($_POST["id"]) == 0)
197 {
198 $this->redirectToParent();
199 }
200
201 include_once("./Services/Skill/classes/class.ilSkillTreeNode.php");
202
203 $items = ilUtil::stripSlashesArray($_POST["id"]);
204 $todel = array(); // delete IDs < 0 (needed for non-js editing)
205 foreach($items as $k => $item)
206 {
207 if ($item < 0)
208 {
209 $todel[] = $k;
210 }
211 }
212 foreach($todel as $k)
213 {
214 unset($items[$k]);
215 }
217 {
218 ilUtil::sendInfo($lng->txt("skmg_insert_please_choose_one_type_only"), true);
219 $this->redirectToParent();
220 }
222
223 // @todo: move this to a service since it can be used here, too
224 include_once("./Modules/LearningModule/classes/class.ilEditClipboard.php");
226 ilUtil::sendInfo($lng->txt("skmg_selected_items_have_been_copied"), true);
227
228 $this->redirectToParent();
229 }
$_POST["username"]
static setAction($a_action)
static uniqueTypesCheck($a_items)
Check for unique types.
static clipboardCopy($a_tree_id, $a_ids)
Copy a set of skills/skill categories into the clipboard.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static stripSlashesArray($a_arr, $a_strip_html=true, $a_allow="")
Strip slashes from array.

References $_POST, $ilCtrl, $lng, ilSkillTreeNode\clipboardCopy(), redirectToParent(), ilUtil\sendInfo(), ilEditClipboard\setAction(), ilUtil\stripSlashesArray(), and ilSkillTreeNode\uniqueTypesCheck().

+ Here is the call graph for this function:

◆ create()

ilSkillTreeNodeGUI::create ( )

Create skill tree node.

Definition at line 334 of file class.ilSkillTreeNodeGUI.php.

335 {
336 global $tpl;
337
338 $this->initForm("create");
339 $tpl->setContent($this->form->getHTML());
340 }
global $tpl
Definition: ilias.php:8
initForm($a_mode="edit")
Init form.

References $tpl, and initForm().

+ Here is the call graph for this function:

◆ cutItems()

ilSkillTreeNodeGUI::cutItems ( )

Copy items to clipboard, then cut them from the current tree.

Definition at line 145 of file class.ilSkillTreeNodeGUI.php.

146 {
147 global $ilCtrl, $lng;
148
149 include_once("./Services/Skill/classes/class.ilSkillTreeNode.php");
150
151 if (!is_array($_POST["id"]) || count($_POST["id"]) == 0)
152 {
153 $this->redirectToParent();
154 }
155
156 $items = ilUtil::stripSlashesArray($_POST["id"]);
157 $todel = array(); // delete IDs < 0 (needed for non-js editing)
158 foreach($items as $k => $item)
159 {
160 if ($item < 0)
161 {
162 $todel[] = $k;
163 }
164 }
165 foreach($todel as $k)
166 {
167 unset($items[$k]);
168 }
169
171 {
172 ilUtil::sendInfo($lng->txt("skmg_insert_please_choose_one_type_only"), true);
173 $this->redirectToParent();
174 }
175
177
178 include_once("./Modules/LearningModule/classes/class.ilEditClipboard.php");
180
181 ilUtil::sendInfo($lng->txt("skmg_selected_items_have_been_cut"), true);
182
183 ilSkillTreeNode::saveChildsOrder((int) $_GET["obj_id"], array(),
184 $_GET["tmpmode"]);
185
186 $this->redirectToParent();
187 }
static clipboardCut($a_tree_id, $a_ids)
Cut and copy a set of skills/skill categories into the clipboard.

References $_GET, $_POST, $ilCtrl, $lng, ilSkillTreeNode\clipboardCut(), redirectToParent(), ilSkillTreeNode\saveChildsOrder(), ilUtil\sendInfo(), ilEditClipboard\setAction(), ilUtil\stripSlashesArray(), and ilSkillTreeNode\uniqueTypesCheck().

+ Here is the call graph for this function:

◆ deleteNodes()

ilSkillTreeNodeGUI::deleteNodes ( )

Delete nodes in the hierarchy.

Definition at line 134 of file class.ilSkillTreeNodeGUI.php.

135 {
136 global $ilCtrl;
137
138 $ilCtrl->setParameter($this, "backcmd", $_GET["backcmd"]);
139 $this->getParentGUI()->deleteNodes($this);
140 }

References $_GET, $ilCtrl, and getParentGUI().

+ Here is the call graph for this function:

◆ editProperties()

ilSkillTreeNodeGUI::editProperties ( )

Edit properties form.

Reimplemented in ilBasicSkillGUI, ilSkillCategoryGUI, ilSkillTemplateCategoryGUI, and ilSkillTemplateReferenceGUI.

Definition at line 364 of file class.ilSkillTreeNodeGUI.php.

365 {
366 global $tpl, $lng;
367
368 if ($this->isInUse())
369 {
370 ilUtil::sendInfo($lng->txt("skmg_skill_in_use"));
371 }
372
373 $this->initForm("edit");
374 $this->getPropertyValues();
375 $tpl->setContent($this->form->getHTML());
376 }
getPropertyValues()
Get property values for edit form.

References $lng, $tpl, getPropertyValues(), initForm(), isInUse(), and ilUtil\sendInfo().

+ Here is the call graph for this function:

◆ exportSelectedNodes()

ilSkillTreeNodeGUI::exportSelectedNodes ( )

Export seleced nodes.

Definition at line 713 of file class.ilSkillTreeNodeGUI.php.

714 {
715 global $ilCtrl;
716
717 if (!is_array($_POST["id"]) || count($_POST["id"]) == 0)
718 {
719 $this->redirectToParent();
720 }
721
722 include_once("./Services/Export/classes/class.ilExport.php");
723 $exp = new ilExport();
724 $conf = $exp->getConfig("Services/Skill");
725 $conf->setSelectedNodes($_POST["id"]);
726 $exp->exportObject("skmg", ilObject::_lookupObjId((int) $_GET["ref_id"]));
727
728 $ilCtrl->redirectByClass(array("iladministrationgui", "ilobjskillmanagementgui", "ilexportgui"), "");
729 }
static _lookupObjId($a_id)

References $_GET, $_POST, $ilCtrl, ilObject\_lookupObjId(), and redirectToParent().

+ Here is the call graph for this function:

◆ getParentGUI()

ilSkillTreeNodeGUI::getParentGUI ( )

Get Parent GUI class (ilObjSCORM2004LearningModuleGUI).

Returns
object Parent GUI class

Definition at line 106 of file class.ilSkillTreeNodeGUI.php.

107 {
108 return $this->parentgui;
109 }

Referenced by confirmedDelete(), deleteNodes(), ilSkillRootGUI\listSkills(), ilSkillRootGUI\listTemplates(), saveAllTitles(), and setLocator().

+ Here is the caller graph for this function:

◆ getPropertyValues()

ilSkillTreeNodeGUI::getPropertyValues ( )

Get property values for edit form.

Definition at line 381 of file class.ilSkillTreeNodeGUI.php.

382 {
383 $values = array();
384
385 $values["title"] = $this->node_object->getTitle();
386 $values["order_nr"] = $this->node_object->getOrderNr();
387 $values["self_eval"] = $this->node_object->getSelfEvaluation();
388 $values["status"] = $this->node_object->getStatus();
389
390 $this->form->setValuesByArray($values);
391 }

Referenced by editProperties().

+ Here is the caller graph for this function:

◆ initForm()

ilSkillTreeNodeGUI::initForm (   $a_mode = "edit")

Init form.

Parameters
int$a_modeEdit Mode

Reimplemented in ilBasicSkillGUI, ilBasicSkillTemplateGUI, ilSkillCategoryGUI, and ilSkillTemplateReferenceGUI.

Definition at line 473 of file class.ilSkillTreeNodeGUI.php.

474 {
475 global $lng, $ilCtrl;
476
477 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
478 $this->form = new ilPropertyFormGUI();
479
480 // title
481 $ti = new ilTextInputGUI($lng->txt("title"), "title");
482 $ti->setMaxLength(200);
483 $ti->setSize(50);
484 $ti->setRequired(true);
485 $this->form->addItem($ti);
486
487 // order nr
488 $ni = new ilNumberInputGUI($lng->txt("skmg_order_nr"), "order_nr");
489 $ni->setMaxLength(6);
490 $ni->setSize(6);
491 $ni->setRequired(true);
492 $this->form->addItem($ni);
493
494 // save and cancel commands
495 if ($this->checkPermissionBool("write"))
496 {
497 if ($a_mode == "create")
498 {
499 $this->form->addCommandButton("save", $lng->txt("save"));
500 $this->form->addCommandButton("cancelSave", $lng->txt("cancel"));
501 $this->form->setTitle($lng->txt("skmg_create_" . $this->getType()));
502 } else
503 {
504 $this->form->addCommandButton("update", $lng->txt("save"));
505 $this->form->setTitle($lng->txt("skmg_edit_" . $this->getType()));
506 }
507 }
508
509 $ilCtrl->setParameter($this, "obj_id", $_GET["obj_id"]);
510 $this->form->setFormAction($ilCtrl->getFormAction($this));
511
512 }
This class represents a number property in a property form.
This class represents a property form user interface.
This class represents a text property in a property form.

References $_GET, $ilCtrl, $lng, and checkPermissionBool().

Referenced by create(), editProperties(), save(), and update().

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

◆ insertBasicSkillClip()

ilSkillTreeNodeGUI::insertBasicSkillClip ( )

Insert basic skills from clipboard.

Definition at line 590 of file class.ilSkillTreeNodeGUI.php.

591 {
592 global $ilCtrl, $ilUser;
593
594 include_once("./Services/Skill/classes/class.ilSkillTreeNode.php");
595 $nodes = ilSkillTreeNode::insertItemsFromClip("skll", (int) $_GET["obj_id"]);
596 $this->redirectToParent();
597 }
static insertItemsFromClip($a_type, $a_obj_id)
Insert basic skills from clipboard.
$ilUser
Definition: imgupload.php:18

References $_GET, $ilCtrl, $ilUser, ilSkillTreeNode\insertItemsFromClip(), and redirectToParent().

+ Here is the call graph for this function:

◆ insertSkillCategoryClip()

ilSkillTreeNodeGUI::insertSkillCategoryClip ( )

Insert skill categories from clipboard.

Definition at line 602 of file class.ilSkillTreeNodeGUI.php.

603 {
604 global $ilCtrl, $ilUser;
605
606 include_once("./Services/Skill/classes/class.ilSkillTreeNode.php");
607 $nodes = ilSkillTreeNode::insertItemsFromClip("scat", (int) $_GET["obj_id"]);
608 $this->redirectToParent();
609 }

References $_GET, $ilCtrl, $ilUser, ilSkillTreeNode\insertItemsFromClip(), and redirectToParent().

+ Here is the call graph for this function:

◆ insertSkillTemplateClip()

ilSkillTreeNodeGUI::insertSkillTemplateClip ( )

Insert skill template from clipboard.

Definition at line 626 of file class.ilSkillTreeNodeGUI.php.

627 {
628 global $ilCtrl, $ilUser;
629
630 include_once("./Services/Skill/classes/class.ilSkillTreeNode.php");
631 $nodes = ilSkillTreeNode::insertItemsFromClip("sktp", (int) $_GET["obj_id"]);
632 $this->redirectToParent();
633 }

References $_GET, $ilCtrl, $ilUser, ilSkillTreeNode\insertItemsFromClip(), and redirectToParent().

+ Here is the call graph for this function:

◆ insertTemplateCategoryClip()

ilSkillTreeNodeGUI::insertTemplateCategoryClip ( )

Insert skill template category from clipboard.

Definition at line 638 of file class.ilSkillTreeNodeGUI.php.

639 {
640 global $ilCtrl, $ilUser;
641
642 include_once("./Services/Skill/classes/class.ilSkillTreeNode.php");
643 $nodes = ilSkillTreeNode::insertItemsFromClip("sctp", (int) $_GET["obj_id"]);
644 $this->redirectToParent();
645 }

References $_GET, $ilCtrl, $ilUser, ilSkillTreeNode\insertItemsFromClip(), and redirectToParent().

+ Here is the call graph for this function:

◆ insertTemplateReferenceClip()

ilSkillTreeNodeGUI::insertTemplateReferenceClip ( )

Insert skill template references from clipboard.

Definition at line 614 of file class.ilSkillTreeNodeGUI.php.

615 {
616 global $ilCtrl, $ilUser;
617
618 include_once("./Services/Skill/classes/class.ilSkillTreeNode.php");
619 $nodes = ilSkillTreeNode::insertItemsFromClip("sktr", (int) $_GET["obj_id"]);
620 $this->redirectToParent();
621 }

References $_GET, $ilCtrl, $ilUser, ilSkillTreeNode\insertItemsFromClip(), and redirectToParent().

+ Here is the call graph for this function:

◆ isInUse()

ilSkillTreeNodeGUI::isInUse ( )

Is in use?

Parameters

return

Definition at line 55 of file class.ilSkillTreeNodeGUI.php.

56 {
57 if (!is_object($this->node_object))
58 {
59 return false;
60 }
61 if ($this->use_checked)
62 {
63 return $this->in_use;
64 }
65 $cskill_ids = ilSkillTreeNode::getAllCSkillIdsForNodeIds(array($this->node_object->getId()));
66 include_once("./Services/Skill/classes/class.ilSkillUsage.php");
67 $u = new ilSkillUsage();
68 $usages = $u->getAllUsagesInfoOfSubtrees($cskill_ids);
69 if (count($usages) > 0)
70 {
71 $this->in_use = true;
72 } else
73 {
74 $this->in_use = false;
75 }
76 return $this->in_use;
77 }
static getAllCSkillIdsForNodeIds(array $a_node_ids)
Get all possible common skill IDs for node IDs.

References $in_use, and ilSkillTreeNode\getAllCSkillIdsForNodeIds().

Referenced by ilBasicSkillGUI\edit(), ilBasicSkillTemplateGUI\edit(), ilBasicSkillGUI\editLevel(), editProperties(), ilSkillCategoryGUI\listItems(), ilSkillTemplateCategoryGUI\listItems(), and ilSkillTemplateReferenceGUI\listItems().

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

◆ readNodeObject()

ilSkillTreeNodeGUI::readNodeObject (   $a_node_id)

Get node object instance.

Definition at line 114 of file class.ilSkillTreeNodeGUI.php.

115 {
116 include_once("./Services/Skill/classes/class.ilSkillTreeNodeFactory.php");
117 $this->node_object = ilSkillTreeNodeFactory::getInstance($a_node_id);
118 }

References ilSkillTreeNodeFactory\getInstance().

Referenced by __construct().

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

◆ redirectToParent()

ilSkillTreeNodeGUI::redirectToParent (   $a_tmp_mode = false)

Redirect to parent (identified by current obj_id)

Parameters

return

Reimplemented in ilBasicSkillGUI, and ilSkillCategoryGUI.

Definition at line 531 of file class.ilSkillTreeNodeGUI.php.

532 {
533 global $ilCtrl;
534
535 if ($_GET["tmpmode"])
536 {
537 $a_tmp_mode = true;
538 }
539
540 $t = ilSkillTreeNode::_lookupType((int) $_GET["obj_id"]);
541
542 switch ($t)
543 {
544 case "skrt":
545 $ilCtrl->setParameterByClass("ilskillrootgui", "obj_id", (int) $_GET["obj_id"]);
546 if ($a_tmp_mode)
547 {
548 $ilCtrl->redirectByClass("ilskillrootgui", "listTemplates");
549 }
550 else
551 {
552 $ilCtrl->redirectByClass("ilskillrootgui", "listSkills");
553 }
554 break;
555
556 case "sctp":
557 $ilCtrl->setParameterByClass("ilskilltemplatecategorygui", "obj_id", (int) $_GET["obj_id"]);
558 $ilCtrl->redirectByClass("ilskilltemplatecategorygui", "listItems");
559 break;
560
561 case "scat":
562 $ilCtrl->setParameterByClass("ilskillcategorygui", "obj_id", (int) $_GET["obj_id"]);
563 $ilCtrl->redirectByClass("ilskillcategorygui", "listItems");
564 break;
565 }
566
567 }

References $_GET, $ilCtrl, $t, and ilSkillTreeNode\_lookupType().

Referenced by ilSkillTemplateCategoryGUI\afterSave(), afterSave(), cancelDelete(), cancelSave(), confirmedDelete(), copyItems(), cutItems(), exportSelectedNodes(), insertBasicSkillClip(), insertSkillCategoryClip(), insertSkillTemplateClip(), insertTemplateCategoryClip(), insertTemplateReferenceClip(), and saveOrder().

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

◆ save()

ilSkillTreeNodeGUI::save ( )

Save skill tree node.

Definition at line 397 of file class.ilSkillTreeNodeGUI.php.

398 {
399 global $tpl, $lng, $ilCtrl;
400
401 if (!$this->checkPermissionBool("write"))
402 {
403 return;
404 }
405
406 $this->initForm("create");
407 if ($this->form->checkInput())
408 {
409 $this->saveItem();
410 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
411 ilSkillTreeNode::saveChildsOrder((int) $_GET["obj_id"], array(),
412 in_array($this->getType(), array("sktp", "sctp")));
413 $this->afterSave();
414 }
415 else
416 {
417 $this->form->setValuesByPost();
418 $tpl->setContent($this->form->getHtml());
419 }
420 }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.

References $_GET, $ilCtrl, $lng, $tpl, afterSave(), checkPermissionBool(), initForm(), ilSkillTreeNode\saveChildsOrder(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ saveAllTitles()

ilSkillTreeNodeGUI::saveAllTitles ( )

Save Titles.

Definition at line 123 of file class.ilSkillTreeNodeGUI.php.

124 {
125 global $ilCtrl;
126
127 $this->getParentGUI()->saveAllTitles(false);
128 $ilCtrl->redirect($this, "showOrganization");
129 }

References $ilCtrl, and getParentGUI().

+ Here is the call graph for this function:

◆ saveOrder()

ilSkillTreeNodeGUI::saveOrder ( )

Save order.

Definition at line 572 of file class.ilSkillTreeNodeGUI.php.

573 {
574 global $ilCtrl, $lng;
575
576 if (!$this->checkPermissionBool("write"))
577 {
578 return;
579 }
580
581 ilSkillTreeNode::saveChildsOrder((int) $_GET["obj_id"], $_POST["order"],
582 (int) $_GET["tmpmode"]);
583 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
584 $this->redirectToParent((int) $_GET["tmpmode"]);
585 }

References $_GET, $_POST, $ilCtrl, $lng, checkPermissionBool(), redirectToParent(), ilSkillTreeNode\saveChildsOrder(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ setLocator()

ilSkillTreeNodeGUI::setLocator ( )

Set Locator Items.

Definition at line 263 of file class.ilSkillTreeNodeGUI.php.

264 {
265 global $ilLocator, $tpl, $ilCtrl;
266
267 $ilLocator->addRepositoryItems($_GET["ref_id"]);
268 $this->getParentGUI()->addLocatorItems();
269
270 if ($_GET["obj_id"] > 0)
271 {
272 include_once("./Services/Skill/classes/class.ilSkillTree.php");
273 $tree = new ilSkillTree();
274 $path = $tree->getPathFull($_GET["obj_id"]);
275 for( $i = 1; $i < count($path); $i++)
276 {
277 switch($path[$i]["type"])
278 {
279 case "scat":
280 $ilCtrl->setParameterByClass("ilskillcategorygui", "obj_id",
281 $path[$i]["child"]);
282 $ilLocator->addItem($path[$i]["title"],
283 $ilCtrl->getLinkTargetByClass("ilskillmanagementgui",
284 "ilskillcategorygui"), "", 0, $path[$i]["type"],
285 ilUtil::getImagePath("icon_skmg.svg"));
286 break;
287
288 case "skll":
289 $ilCtrl->setParameterByClass("ilbasicskillgui", "obj_id",
290 $path[$i]["child"]);
291 $ilLocator->addItem($path[$i]["title"],
292 $ilCtrl->getLinkTargetByClass("ilskillmanagementgui",
293 "ilbasicskillgui"), "", 0, $path[$i]["type"],
294 ilUtil::getImagePath("icon_skmg.svg"));
295 break;
296
297 }
298 }
299 }
300 $ilCtrl->setParameter($this, "obj_id", $_GET["obj_id"]);
301
302 $tpl->setLocator();
303 }
$path
Definition: aliased.php:25
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)

References $_GET, $ilCtrl, $path, $tpl, ilUtil\getImagePath(), and getParentGUI().

Referenced by ilBasicSkillGUI\showProperties().

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

◆ setParentGUI()

ilSkillTreeNodeGUI::setParentGUI (   $a_parentgui)

Set Parent GUI class.

Parameters
object$a_parentguiParent GUI class

Definition at line 96 of file class.ilSkillTreeNodeGUI.php.

97 {
98 $this->parentgui = $a_parentgui;
99 }

◆ setSkillNodeDescription()

ilSkillTreeNodeGUI::setSkillNodeDescription ( )

Set skill node description.

Definition at line 308 of file class.ilSkillTreeNodeGUI.php.

309 {
310 global $tpl;
311
312 if (is_object($this->node_object))
313 {
314 include_once("./Services/Skill/classes/class.ilSkillTree.php");
315 $tree = new ilSkillTree();
316 $path = $this->node_object->skill_tree->getSkillTreePath($this->node_object->getId(),
317 $this->tref_id);
318 $desc = "";
319 foreach ($path as $p)
320 {
321 if (in_array($p["type"], array("scat", "skll", "sktr")))
322 {
323 $desc.= $sep.$p["title"];
324 $sep = " > ";
325 }
326 }
327 }
328 $tpl->setDescription($desc);
329 }

References $path, and $tpl.

Referenced by ilSkillCategoryGUI\setTabs(), ilSkillTemplateCategoryGUI\setTabs(), ilBasicSkillTemplateGUI\setTabs(), ilSkillTemplateReferenceGUI\setTabs(), and ilBasicSkillGUI\setTabs().

+ Here is the caller graph for this function:

◆ setTitleIcon()

ilSkillTreeNodeGUI::setTitleIcon ( )

Set title icon.

Definition at line 650 of file class.ilSkillTreeNodeGUI.php.

651 {
652 global $tpl;
653
654 $obj_id = (is_object($this->node_object))
655 ? $this->node_object->getId()
656 :0;
657 $tpl->setTitleIcon(
659 $obj_id, $this->getType(), "",
661 }
static getIconPath($a_obj_id, $a_type, $a_size="", $a_status=0)
Get icon path.
static _lookupStatus($a_obj_id)
Lookup Status.

References $tpl, ilSkillTreeNode\_lookupStatus(), ilSkillTreeNode\getIconPath(), and ilSkillTreeNode\STATUS_DRAFT.

+ Here is the call graph for this function:

◆ showUsage()

ilSkillTreeNodeGUI::showUsage ( )

Show skill usage.

Reimplemented in ilBasicSkillTemplateGUI, and ilSkillTemplateCategoryGUI.

Definition at line 686 of file class.ilSkillTreeNodeGUI.php.

687 {
688 global $tpl;
689
690 $this->setTabs("usage");
691
692 include_once("./Services/Skill/classes/class.ilSkillUsage.php");
693 $usage_info = new ilSkillUsage();
694 $base_skill_id = ($this->base_skill_id > 0)
695 ? $this->base_skill_id
696 : $this->node_object->getId();
697 $usages = $usage_info->getAllUsagesInfoOfSubtree($base_skill_id.":".$this->tref_id);
698
699 $html = "";
700 include_once("./Services/Skill/classes/class.ilSkillUsageTableGUI.php");
701 foreach ($usages as $k => $usage)
702 {
703 $tab = new ilSkillUsageTableGUI($this, "showUsage", $k, $usage);
704 $html.= $tab->getHTML()."<br/><br/>";
705 }
706
707 $tpl->setContent($html);
708 }
TableGUI class for skill usages.
$html
Definition: example_001.php:87

References $html, $tab, and $tpl.

◆ update()

ilSkillTreeNodeGUI::update ( )

Update skill tree node.

Definition at line 435 of file class.ilSkillTreeNodeGUI.php.

436 {
437 global $tpl, $lng, $ilCtrl;
438
439 if (!$this->checkPermissionBool("write"))
440 {
441 return;
442 }
443
444 $this->initForm("edit");
445 if ($this->form->checkInput())
446 {
447 $this->updateItem();
448 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
449 $this->afterUpdate();
450 }
451 else
452 {
453 $this->form->setValuesByPost();
454 $tpl->setContent($this->form->getHtml());
455 }
456 }

References $ilCtrl, $lng, $tpl, afterUpdate(), checkPermissionBool(), initForm(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

Field Documentation

◆ $access

ilSkillTreeNodeGUI::$access

Definition at line 23 of file class.ilSkillTreeNodeGUI.php.

◆ $in_use

ilSkillTreeNodeGUI::$in_use = false

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

Referenced by isInUse().

◆ $node_object

ilSkillTreeNodeGUI::$node_object

Definition at line 17 of file class.ilSkillTreeNodeGUI.php.

◆ $ref_id

ilSkillTreeNodeGUI::$ref_id

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

Referenced by ilBasicSkillGUI\saveLevelResource().

◆ $use_checked

ilSkillTreeNodeGUI::$use_checked = false

Definition at line 19 of file class.ilSkillTreeNodeGUI.php.


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