ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilSkillRootGUI.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5include_once("./Services/Skill/classes/class.ilSkillTreeNodeGUI.php");
6
17{
18
22 function __construct($a_node_id = 0)
23 {
24 global $ilCtrl;
25
26 $ilCtrl->saveParameter($this, "obj_id");
27
28 parent::ilSkillTreeNodeGUI($a_node_id);
29 }
30
34 function getType()
35 {
36 return "skrt";
37 }
38
42 function &executeCommand()
43 {
44 global $ilCtrl, $tpl, $ilTabs;
45
46 $tpl->getStandardTemplate();
47
48 $next_class = $ilCtrl->getNextClass($this);
49 $cmd = $ilCtrl->getCmd();
50
51 switch($next_class)
52 {
53 default:
54 $ret = $this->$cmd();
55 break;
56 }
57 }
58
62 function listTemplates()
63 {
64 global $tpl, $ilToolbar, $ilCtrl, $lng, $ilTabs;
65
66 $skmg_set = new ilSetting("skmg");
67 $enable_skmg = $skmg_set->get("enable_skmg");
68 if (!$enable_skmg)
69 {
70 ilUtil::sendInfo($lng->txt("skmg_skill_management_deactivated"));
71 }
72
73 $this->getParentGUI()->showTree(true, $this, "listTemplates");
74 $ilTabs->activateTab("skill_templates");
75
76 include_once("./Services/Skill/classes/class.ilSkillTemplateCategoryGUI.php");
77 if ($this->checkPermissionBool("write"))
78 {
80 }
81
82 include_once("./Services/Skill/classes/class.ilSkillCatTableGUI.php");
83 $table = new ilSkillCatTableGUI($this, "listTemplates", (int) $_GET["obj_id"],
85
86 $tpl->setContent($table->getHTML());
87 }
88
92 function listSkills()
93 {
94 global $tpl, $ilToolbar, $ilCtrl, $lng, $ilTabs;
95
96 $skmg_set = new ilSetting("skmg");
97 $enable_skmg = $skmg_set->get("enable_skmg");
98 if (!$enable_skmg)
99 {
100 ilUtil::sendInfo($lng->txt("skmg_skill_management_deactivated"));
101 }
102
103 $this->getParentGUI()->showTree(false, $this, "listSkills");
104 $ilTabs->activateTab("skills");
105
106 include_once("./Services/Skill/classes/class.ilSkillCategoryGUI.php");
107 if ($this->checkPermissionBool("write"))
108 {
110 }
111
112 include_once("./Services/Skill/classes/class.ilSkillCatTableGUI.php");
113 $table = new ilSkillCatTableGUI($this, "listSkills", (int) $_GET["obj_id"],
115
116 $tpl->setContent($table->getHTML());
117 }
118
122 function cancelDelete()
123 {
124 global $ilCtrl;
125
126 if ($_GET["tmpmode"])
127 {
128 $ilCtrl->redirect($this, "listTemplates");
129 }
130 else
131 {
132 $ilCtrl->redirect($this, "listSkills");
133 }
134 }
135
136}
137
138?>
global $tpl
Definition: ilias.php:8
$_GET["client_id"]
ILIAS Setting Class.
static addCreationButtons()
Add creation buttons.
Skill root GUI class.
cancelDelete()
cancel delete
getType()
Get Node Type.
listSkills()
List skills.
& executeCommand()
Execute command.
__construct($a_node_id=0)
Constructor.
listTemplates()
List templates.
static addCreationButtons()
Add creation buttons.
Basic GUI class for skill tree nodes.
getParentGUI()
Get Parent GUI class (ilObjSCORM2004LearningModuleGUI).
checkPermissionBool($a_perm)
Check permission pool.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
global $ilCtrl
Definition: ilias.php:18
global $lng
Definition: privfeed.php:40
$cmd
Definition: sahs_server.php:35