ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
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");
78 
79  include_once("./Services/Skill/classes/class.ilSkillCatTableGUI.php");
80  $table = new ilSkillCatTableGUI($this, "listTemplates", (int) $_GET["obj_id"],
82 
83  $tpl->setContent($table->getHTML());
84  }
85 
89  function listSkills()
90  {
91  global $tpl, $ilToolbar, $ilCtrl, $lng, $ilTabs;
92 
93  $skmg_set = new ilSetting("skmg");
94  $enable_skmg = $skmg_set->get("enable_skmg");
95  if (!$enable_skmg)
96  {
97  ilUtil::sendInfo($lng->txt("skmg_skill_management_deactivated"));
98  }
99 
100  $this->getParentGUI()->showTree(false, $this, "listSkills");
101  $ilTabs->activateTab("skills");
102 
103  include_once("./Services/Skill/classes/class.ilSkillCategoryGUI.php");
105 
106  include_once("./Services/Skill/classes/class.ilSkillCatTableGUI.php");
107  $table = new ilSkillCatTableGUI($this, "listSkills", (int) $_GET["obj_id"],
109 
110  $tpl->setContent($table->getHTML());
111  }
112 
116  function cancelDelete()
117  {
118  global $ilCtrl;
119  if ($_GET["tmpmode"])
120  {
121  $ilCtrl->redirect($this, "listTemplates");
122  }
123  else
124  {
125  $ilCtrl->redirect($this, "listSkills");
126  }
127  }
128 
129 }
130 
131 ?>