ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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$

ilSkillRootGUI: ilObjSkillManagementGUI

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

Constructor & Destructor Documentation

◆ __construct()

ilSkillRootGUI::__construct (   $a_node_id = 0)

Constructor.

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

References $DIC, and $ilCtrl.

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 $DIC
Definition: saml.php:7
global $ilCtrl
Definition: ilias.php:18

Member Function Documentation

◆ cancelDelete()

ilSkillRootGUI::cancelDelete ( )

cancel delete

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

References $_GET, $ctrl, and $ilCtrl.

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

◆ executeCommand()

ilSkillRootGUI::executeCommand ( )

Execute command.

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

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

75  {
77  $tpl = $this->tpl;
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  }
global $ilCtrl
Definition: ilias.php:18
$ret
Definition: parser.php:6

◆ 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.

References $ctrl, $form, $ilCtrl, $lng, $tabs, $tpl, initInputForm(), and ilUtil\sendSuccess().

219  {
220  $tpl = $this->tpl;
221  $lng = $this->lng;
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  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
initInputForm()
Init input form.
Import class.
global $ilCtrl
Definition: ilias.php:18
if(isset($_POST['submit'])) $form
+ Here is the call graph for this function:

◆ initInputForm()

ilSkillRootGUI::initInputForm ( )

Init input form.

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

References $ctrl, $form, $ilCtrl, $lng, array, and ilFileInputGUI\setSuffixes().

Referenced by importSkills(), and showImportForm().

192  {
193  $lng = $this->lng;
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 property form user interface.
This class represents a file property in a property form.
global $ilCtrl
Definition: ilias.php:18
if(isset($_POST['submit'])) $form
Create styles array
The data for the language used.
setSuffixes($a_suffixes)
Set Accepted Suffixes.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ listSkills()

ilSkillRootGUI::listSkills ( )

List skills.

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

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

130  {
131  $tpl = $this->tpl;
132  $ilToolbar = $this->toolbar;
134  $lng = $this->lng;
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");
153  $this,
154  "listSkills",
155  (int) $_GET["obj_id"],
157  );
158 
159  $tpl->setContent($table->getHTML());
160  }
static addCreationButtons()
Add creation buttons.
$_GET["client_id"]
getParentGUI()
Get Parent GUI class (ilObjSCORM2004LearningModuleGUI).
checkPermissionBool($a_perm)
Check permission pool.
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
if(empty($password)) $table
Definition: pwgen.php:24
+ Here is the call graph for this function:

◆ listTemplates()

ilSkillRootGUI::listTemplates ( )

List templates.

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

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

94  {
95  $tpl = $this->tpl;
96  $ilToolbar = $this->toolbar;
98  $lng = $this->lng;
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");
117  $this,
118  "listTemplates",
119  (int) $_GET["obj_id"],
121  );
122 
123  $tpl->setContent($table->getHTML());
124  }
$_GET["client_id"]
getParentGUI()
Get Parent GUI class (ilObjSCORM2004LearningModuleGUI).
checkPermissionBool($a_perm)
Check permission pool.
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static addCreationButtons()
Add creation buttons.
if(empty($password)) $table
Definition: pwgen.php:24
+ Here is the call graph for this function:

◆ showImportForm()

ilSkillRootGUI::showImportForm ( )

Show import form.

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

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

180  {
181  $tpl = $this->tpl;
182  $ilTabs = $this->tabs;
183 
184  $ilTabs->activateTab("skills");
185  $tpl->setContent($this->initInputForm()->getHTML());
186  }
initInputForm()
Init input form.
+ 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: