ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilSkillRootGUI Class Reference

Skill root GUI class. More...

+ Inheritance diagram for ilSkillRootGUI:
+ Collaboration diagram for ilSkillRootGUI:

Public Member Functions

 __construct ($a_node_id=0)
 Constructor. More...
 
 getType ()
 Get Node Type. More...
 
 executeCommand ()
 Execute command. More...
 
 listTemplates ()
 List templates. More...
 
 listSkills ()
 List skills. More...
 
 cancelDelete ()
 cancel delete More...
 
 showImportForm ()
 Show import form. More...
 
 initInputForm ()
 Init input form. More...
 
 importSkills ()
 Import skills. More...
 
- Public Member Functions inherited from ilSkillTreeNodeGUI
 __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...
 

Protected Attributes

 $ctrl
 
 $tpl
 
 $tabs
 
 $toolbar
 
 $lng
 
- Protected Attributes inherited from ilSkillTreeNodeGUI
 $ctrl
 
 $lng
 
 $locator
 
 $tpl
 
 $user
 

Additional Inherited Members

- Data Fields inherited from ilSkillTreeNodeGUI
 $node_object
 
 $in_use = false
 
 $use_checked = false
 
 $access
 
 $ref_id
 

Detailed Description

Skill root GUI class.

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

@ilCtrl_isCalledBy ilSkillRootGUI: ilObjSkillManagementGUI

Definition at line 16 of file class.ilSkillRootGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilSkillRootGUI::__construct (   $a_node_id = 0)

Constructor.

Reimplemented from ilSkillTreeNodeGUI.

Definition at line 47 of file class.ilSkillRootGUI.php.

48 {
49 global $DIC;
50
51 $this->ctrl = $DIC->ctrl();
52 $this->tpl = $DIC["tpl"];
53 $this->tabs = $DIC->tabs();
54 $this->toolbar = $DIC->toolbar();
55 $this->lng = $DIC->language();
56 $ilCtrl = $DIC->ctrl();
57
58 $ilCtrl->saveParameter($this, "obj_id");
59
60 parent::__construct($a_node_id);
61 }
global $ilCtrl
Definition: ilias.php:18
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$DIC
Definition: xapitoken.php:46

References $DIC, $ilCtrl, and ILIAS\GlobalScreen\Provider\__construct().

+ Here is the call graph for this function:

Member Function Documentation

◆ cancelDelete()

ilSkillRootGUI::cancelDelete ( )

cancel delete

Reimplemented from ilSkillTreeNodeGUI.

Definition at line 165 of file class.ilSkillRootGUI.php.

166 {
168
169 if ($_GET["tmpmode"]) {
170 $ilCtrl->redirect($this, "listTemplates");
171 } else {
172 $ilCtrl->redirect($this, "listSkills");
173 }
174 }
$_GET["client_id"]

References $_GET, $ctrl, and $ilCtrl.

◆ executeCommand()

ilSkillRootGUI::executeCommand ( )

Execute command.

Definition at line 74 of file class.ilSkillRootGUI.php.

75 {
78 $ilTabs = $this->tabs;
79
80 $next_class = $ilCtrl->getNextClass($this);
81 $cmd = $ilCtrl->getCmd();
82
83 switch ($next_class) {
84 default:
85 $ret = $this->$cmd();
86 break;
87 }
88 }
$ret
Definition: parser.php:6

References $ctrl, $ilCtrl, $ret, $tabs, and $tpl.

◆ getType()

ilSkillRootGUI::getType ( )

Get Node Type.

Definition at line 66 of file class.ilSkillRootGUI.php.

67 {
68 return "skrt";
69 }

◆ importSkills()

ilSkillRootGUI::importSkills ( )

Import skills.

Definition at line 218 of file class.ilSkillRootGUI.php.

219 {
223 $ilTabs = $this->tabs;
224
225 $form = $this->initInputForm();
226 if ($form->checkInput()) {
227 include_once("./Services/Export/classes/class.ilImport.php");
228 $imp = new ilImport();
229 $imp->importEntity($_FILES["import_file"]["tmp_name"], $_FILES["import_file"]["name"], "skmg", "Services/Skill");
230
231 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
232 $ilCtrl->redirect($this, "listSkills");
233 } else {
234 $ilTabs->activateTab("skills");
235 $form->setValuesByPost();
236 $tpl->setContent($form->getHtml());
237 }
238 }
Import class.
initInputForm()
Init input form.

References $ctrl, $ilCtrl, $lng, $tabs, $tpl, and initInputForm().

+ Here is the call graph for this function:

◆ initInputForm()

ilSkillRootGUI::initInputForm ( )

Init input form.

Definition at line 191 of file class.ilSkillRootGUI.php.

192 {
195
196 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
197 $form = new ilPropertyFormGUI();
198
199 include_once("./Services/Form/classes/class.ilFileInputGUI.php");
200 $fi = new ilFileInputGUI($lng->txt("skmg_input_file"), "import_file");
201 $fi->setSuffixes(array("zip"));
202 $fi->setRequired(true);
203 $form->addItem($fi);
204
205 // save and cancel commands
206 $form->addCommandButton("importSkills", $lng->txt("import"));
207 $form->addCommandButton("listSkills", $lng->txt("cancel"));
208
209 $form->setTitle($lng->txt("skmg_import_skills"));
210 $form->setFormAction($ilCtrl->getFormAction($this));
211
212 return $form;
213 }
This class represents a file property in a property form.
This class represents a property form user interface.

References $ctrl, $ilCtrl, and $lng.

Referenced by importSkills(), and showImportForm().

+ Here is the caller graph for this function:

◆ listSkills()

ilSkillRootGUI::listSkills ( )

List skills.

Definition at line 129 of file class.ilSkillRootGUI.php.

130 {
132 $ilToolbar = $this->toolbar;
135 $ilTabs = $this->tabs;
136
137 $skmg_set = new ilSetting("skmg");
138 $enable_skmg = $skmg_set->get("enable_skmg");
139 if (!$enable_skmg) {
140 ilUtil::sendInfo($lng->txt("skmg_skill_management_deactivated"));
141 }
142
143 $this->getParentGUI()->showTree(false, $this, "listSkills");
144 $ilTabs->activateTab("skills");
145
146 include_once("./Services/Skill/classes/class.ilSkillCategoryGUI.php");
147 if ($this->checkPermissionBool("write")) {
149 }
150
151 include_once("./Services/Skill/classes/class.ilSkillCatTableGUI.php");
152 $table = new ilSkillCatTableGUI(
153 $this,
154 "listSkills",
155 (int) $_GET["obj_id"],
157 );
158
159 $tpl->setContent($table->getHTML());
160 }
ILIAS Setting Class.
static addCreationButtons()
Add creation buttons.
getParentGUI()
Get Parent GUI class (ilObjSCORM2004LearningModuleGUI).
checkPermissionBool($a_perm)
Check permission pool.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.

References $_GET, $ctrl, $ilCtrl, $lng, $tabs, $toolbar, $tpl, ilSkillCategoryGUI\addCreationButtons(), ilSkillTreeNodeGUI\checkPermissionBool(), ilSkillTreeNodeGUI\getParentGUI(), ilSkillCatTableGUI\MODE_SCAT, and ilUtil\sendInfo().

+ Here is the call graph for this function:

◆ listTemplates()

ilSkillRootGUI::listTemplates ( )

List templates.

Definition at line 93 of file class.ilSkillRootGUI.php.

94 {
96 $ilToolbar = $this->toolbar;
99 $ilTabs = $this->tabs;
100
101 $skmg_set = new ilSetting("skmg");
102 $enable_skmg = $skmg_set->get("enable_skmg");
103 if (!$enable_skmg) {
104 ilUtil::sendInfo($lng->txt("skmg_skill_management_deactivated"));
105 }
106
107 $this->getParentGUI()->showTree(true, $this, "listTemplates");
108 $ilTabs->activateTab("skill_templates");
109
110 include_once("./Services/Skill/classes/class.ilSkillTemplateCategoryGUI.php");
111 if ($this->checkPermissionBool("write")) {
113 }
114
115 include_once("./Services/Skill/classes/class.ilSkillCatTableGUI.php");
116 $table = new ilSkillCatTableGUI(
117 $this,
118 "listTemplates",
119 (int) $_GET["obj_id"],
121 );
122
123 $tpl->setContent($table->getHTML());
124 }
static addCreationButtons()
Add creation buttons.

References $_GET, $ctrl, $ilCtrl, $lng, $tabs, $toolbar, $tpl, ilSkillTemplateCategoryGUI\addCreationButtons(), ilSkillTreeNodeGUI\checkPermissionBool(), ilSkillTreeNodeGUI\getParentGUI(), ilSkillCatTableGUI\MODE_SCTP, and ilUtil\sendInfo().

+ Here is the call graph for this function:

◆ showImportForm()

ilSkillRootGUI::showImportForm ( )

Show import form.

Definition at line 179 of file class.ilSkillRootGUI.php.

180 {
182 $ilTabs = $this->tabs;
183
184 $ilTabs->activateTab("skills");
185 $tpl->setContent($this->initInputForm()->getHTML());
186 }

References $tabs, $tpl, and initInputForm().

+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ilSkillRootGUI::$ctrl
protected

◆ $lng

ilSkillRootGUI::$lng
protected

Definition at line 41 of file class.ilSkillRootGUI.php.

Referenced by importSkills(), initInputForm(), listSkills(), and listTemplates().

◆ $tabs

ilSkillRootGUI::$tabs
protected

◆ $toolbar

ilSkillRootGUI::$toolbar
protected

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

Referenced by listSkills(), and listTemplates().

◆ $tpl

ilSkillRootGUI::$tpl
protected

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