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 
5 include_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 ?>
ILIAS Setting Class.
Skill root GUI class.
static addCreationButtons()
Add creation buttons.
getType()
Get Node Type.
$_GET["client_id"]
$cmd
Definition: sahs_server.php:35
cancelDelete()
cancel delete
getParentGUI()
Get Parent GUI class (ilObjSCORM2004LearningModuleGUI).
listSkills()
List skills.
global $tpl
Definition: ilias.php:8
checkPermissionBool($a_perm)
Check permission pool.
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
Basic GUI class for skill tree nodes.
listTemplates()
List templates.
static addCreationButtons()
Add creation buttons.
__construct($a_node_id=0)
Constructor.
& executeCommand()
Execute command.
global $lng
Definition: privfeed.php:40