ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
ilSkillTemplateCategoryGUI Class Reference

Skill template category GUI class. More...

+ Inheritance diagram for ilSkillTemplateCategoryGUI:
+ Collaboration diagram for ilSkillTemplateCategoryGUI:

Public Member Functions

 __construct ($a_node_id=0, $a_tref_id)
 Constructor. More...
 
 getType ()
 Get Node Type. More...
 
executeCommand ()
 Execute command. More...
 
 setTabs ($a_tab)
 output tabs More...
 
 listItems ()
 List items. More...
 
 editProperties ()
 Edit properties. More...
 
 saveItem ()
 Save item. More...
 
 updateItem ()
 Update item. More...
 
 afterSave ()
 After saving. More...
 
- Public Member Functions inherited from ilSkillTreeNodeGUI
 ilSkillTreeNodeGUI ($a_node_id=0)
 constructor 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...
 

Static Public Member Functions

static addCreationButtons ()
 Add creation buttons. More...
 

Additional Inherited Members

- Data Fields inherited from ilSkillTreeNodeGUI
 $node_object
 

Detailed Description

Skill template category GUI class.

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

@ilCtrl_isCalledBy ilSkillTemplateCategoryGUI: ilObjSkillManagementGUI

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

Constructor & Destructor Documentation

◆ __construct()

ilSkillTemplateCategoryGUI::__construct (   $a_node_id = 0,
  $a_tref_id 
)

Constructor.

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

24 {
25 global $ilCtrl;
26
27 $ilCtrl->saveParameter($this, "obj_id");
28 $this->tref_id = $a_tref_id;
29
30 parent::ilSkillTreeNodeGUI($a_node_id);
31 }
global $ilCtrl
Definition: ilias.php:18

References $ilCtrl.

Member Function Documentation

◆ addCreationButtons()

static ilSkillTemplateCategoryGUI::addCreationButtons ( )
static

Add creation buttons.

Parameters

return

Definition at line 138 of file class.ilSkillTemplateCategoryGUI.php.

139 {
140 global $ilCtrl, $lng, $ilToolbar, $ilUser;
141
142 $ilCtrl->setParameterByClass("ilobjskillmanagementgui", "tmpmode", 1);
143
144 $ilCtrl->setParameterByClass("ilbasicskilltemplategui",
145 "obj_id", (int) $_GET["obj_id"]);
146 $ilToolbar->addButton($lng->txt("skmg_create_skill_template"),
147 $ilCtrl->getLinkTargetByClass("ilbasicskilltemplategui", "create"));
148 $ilCtrl->setParameterByClass("ilskilltemplatecategorygui",
149 "obj_id", (int) $_GET["obj_id"]);
150 $ilToolbar->addButton($lng->txt("skmg_create_skill_template_category"),
151 $ilCtrl->getLinkTargetByClass("ilskilltemplatecategorygui", "create"));
152
153 // skill templates from clipboard
154 $sep = false;
155 if ($ilUser->clipboardHasObjectsOfType("sktp"))
156 {
157 $ilToolbar->addSeparator();
158 $sep = true;
159 $ilToolbar->addButton($lng->txt("skmg_insert_skill_template_from_clip"),
160 $ilCtrl->getLinkTargetByClass("ilskilltemplatecategorygui", "insertSkillTemplateClip"));
161 }
162
163 // template categories from clipboard
164 if ($ilUser->clipboardHasObjectsOfType("sctp"))
165 {
166 if (!$sep)
167 {
168 $ilToolbar->addSeparator();
169 $sep = true;
170 }
171 $ilToolbar->addButton($lng->txt("skmg_insert_template_category_from_clip"),
172 $ilCtrl->getLinkTargetByClass("ilskilltemplatecategorygui", "insertTemplateCategoryClip"));
173 }
174
175 }
$_GET["client_id"]
global $lng
Definition: privfeed.php:40
global $ilUser
Definition: imgupload.php:15

References $_GET, $ilCtrl, $ilUser, and $lng.

Referenced by listItems(), and ilSkillRootGUI\listTemplates().

+ Here is the caller graph for this function:

◆ afterSave()

ilSkillTemplateCategoryGUI::afterSave ( )

After saving.

Reimplemented from ilSkillTreeNodeGUI.

Definition at line 213 of file class.ilSkillTemplateCategoryGUI.php.

214 {
215 $this->redirectToParent(true);
216 }
redirectToParent($a_tmp_mode=false)
Redirect to parent (identified by current obj_id)

References ilSkillTreeNodeGUI\redirectToParent().

+ Here is the call graph for this function:

◆ editProperties()

ilSkillTemplateCategoryGUI::editProperties ( )

Edit properties.

Reimplemented from ilSkillTreeNodeGUI.

Definition at line 180 of file class.ilSkillTemplateCategoryGUI.php.

181 {
182 $this->setTabs("properties");
183 parent::editProperties();
184 }

References setTabs().

+ Here is the call graph for this function:

◆ executeCommand()

& ilSkillTemplateCategoryGUI::executeCommand ( )

Execute command.

Definition at line 44 of file class.ilSkillTemplateCategoryGUI.php.

45 {
46 global $ilCtrl, $tpl, $ilTabs;
47
48 $tpl->getStandardTemplate();
49
50 $next_class = $ilCtrl->getNextClass($this);
51 $cmd = $ilCtrl->getCmd();
52
53 switch($next_class)
54 {
55 default:
56 $ret = $this->$cmd();
57 break;
58 }
59 }
global $tpl
Definition: ilias.php:8
$cmd
Definition: sahs_server.php:35

References $cmd, $ilCtrl, $ret, and $tpl.

◆ getType()

ilSkillTemplateCategoryGUI::getType ( )

Get Node Type.

Definition at line 36 of file class.ilSkillTemplateCategoryGUI.php.

37 {
38 return "sctp";
39 }

◆ listItems()

ilSkillTemplateCategoryGUI::listItems ( )

List items.

Parameters

return

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

115 {
116 global $tpl;
117
118 if ($this->tref_id == 0)
119 {
121 }
122
123 $this->setTabs("content");
124
125 include_once("./Services/Skill/classes/class.ilSkillCatTableGUI.php");
126 $table = new ilSkillCatTableGUI($this, "listItems", (int) $_GET["obj_id"],
127 ilSkillCatTableGUI::MODE_SCTP, $this->tref_id);
128
129 $tpl->setContent($table->getHTML());
130 }
static addCreationButtons()
Add creation buttons.

References $_GET, $tpl, addCreationButtons(), ilSkillCatTableGUI\MODE_SCTP, and setTabs().

+ Here is the call graph for this function:

◆ saveItem()

ilSkillTemplateCategoryGUI::saveItem ( )

Save item.

Definition at line 190 of file class.ilSkillTemplateCategoryGUI.php.

191 {
192 $it = new ilSkillTemplateCategory();
193 $it->setTitle($this->form->getInput("title"));
194 $it->setOrderNr($this->form->getInput("order_nr"));
195 $it->create();
196 ilSkillTreeNode::putInTree($it, (int) $_GET["obj_id"], IL_LAST_NODE);
197 }
const IL_LAST_NODE
Definition: class.ilTree.php:4
static putInTree($a_obj, $a_parent_id="", $a_target_node_id="")
Put this object into the skill tree.

References $_GET, IL_LAST_NODE, and ilSkillTreeNode\putInTree().

+ Here is the call graph for this function:

◆ setTabs()

ilSkillTemplateCategoryGUI::setTabs (   $a_tab)

output tabs

Definition at line 64 of file class.ilSkillTemplateCategoryGUI.php.

65 {
66 global $ilTabs, $ilCtrl, $tpl, $lng, $ilHelp;
67
68 $ilTabs->clearTargets();
69 $ilHelp->setScreenIdComponent("skmg_sctp");
70
71 // content
72 $ilTabs->addTab("content", $lng->txt("content"),
73 $ilCtrl->getLinkTarget($this, 'listItems'));
74
75 if ($this->tref_id > 0)
76 {
77 // usage
78 $this->addUsageTab($ilTabs);
79 }
80
81 // properties
82 if ($this->tref_id == 0)
83 {
84 $ilTabs->addTab("properties", $lng->txt("settings"),
85 $ilCtrl->getLinkTarget($this, 'editProperties'));
86 }
87
88 // back link
89 if ($this->tref_id == 0)
90 {
91 $ilCtrl->setParameterByClass("ilskillrootgui", "obj_id",
92 $this->node_object->skill_tree->getRootId());
93 $ilTabs->setBackTarget($lng->txt("skmg_skill_templates"),
94 $ilCtrl->getLinkTargetByClass("ilskillrootgui", "listTemplates"));
95 $ilCtrl->setParameterByClass("ilskillrootgui", "obj_id",
96 $_GET["obj_id"]);
97 }
98
99 parent::setTitleIcon();
100 $tpl->setTitle(
101 $lng->txt("skmg_sctp").": ".$this->node_object->getTitle());
103
104 $ilTabs->activateTab($a_tab);
105
106 }
setSkillNodeDescription()
Set skill node description.
addUsageTab($a_tabs)
Add usage tab.

References $_GET, $ilCtrl, $lng, $tpl, ilSkillTreeNodeGUI\addUsageTab(), and ilSkillTreeNodeGUI\setSkillNodeDescription().

Referenced by editProperties(), and listItems().

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

◆ updateItem()

ilSkillTemplateCategoryGUI::updateItem ( )

Update item.

Definition at line 202 of file class.ilSkillTemplateCategoryGUI.php.

203 {
204 $this->node_object->setTitle($this->form->getInput("title"));
205 $this->node_object->setOrderNr($this->form->getInput("order_nr"));
206 $this->node_object->setSelfEvaluation($_POST["self_eval"]);
207 $this->node_object->update();
208 }
$_POST['username']
Definition: cron.php:12

References $_POST.


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