ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
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...
 
 addObjectsTab ($a_tabs)
 
 showObjects ()
 Show assigned objects. 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

Constructor & Destructor Documentation

◆ __construct()

ilSkillRootGUI::__construct (   $a_node_id = 0)

Constructor.

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

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

43  {
44  global $DIC;
45 
46  $this->ctrl = $DIC->ctrl();
47  $this->tpl = $DIC["tpl"];
48  $this->tabs = $DIC->tabs();
49  $this->toolbar = $DIC->toolbar();
50  $this->lng = $DIC->language();
51  $ilCtrl = $DIC->ctrl();
52 
53  $ilCtrl->saveParameter($this, "obj_id");
54 
55  parent::__construct($a_node_id);
56  }
global $DIC
Definition: goto.php:24
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ cancelDelete()

ilSkillRootGUI::cancelDelete ( )

cancel delete

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

References $_GET, and $ctrl.

157  {
158  $ilCtrl = $this->ctrl;
159 
160  if ($_GET["tmpmode"]) {
161  $ilCtrl->redirect($this, "listTemplates");
162  } else {
163  $ilCtrl->redirect($this, "listSkills");
164  }
165  }
$_GET["client_id"]

◆ executeCommand()

ilSkillRootGUI::executeCommand ( )

Execute command.

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

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

70  {
71  $ilCtrl = $this->ctrl;
72  $tpl = $this->tpl;
73  $ilTabs = $this->tabs;
74 
75  $next_class = $ilCtrl->getNextClass($this);
76  $cmd = $ilCtrl->getCmd();
77 
78  switch ($next_class) {
79  default:
80  $ret = $this->$cmd();
81  break;
82  }
83  }
$ret
Definition: parser.php:6

◆ getType()

ilSkillRootGUI::getType ( )

Get Node Type.

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

62  {
63  return "skrt";
64  }

◆ importSkills()

ilSkillRootGUI::importSkills ( )

Import skills.

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

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

208  {
209  $tpl = $this->tpl;
210  $lng = $this->lng;
211  $ilCtrl = $this->ctrl;
212  $ilTabs = $this->tabs;
213 
214  $form = $this->initInputForm();
215  if ($form->checkInput()) {
216  $imp = new ilImport();
217  $imp->importEntity($_FILES["import_file"]["tmp_name"], $_FILES["import_file"]["name"], "skmg", "Services/Skill");
218 
219  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
220  $ilCtrl->redirect($this, "listSkills");
221  } else {
222  $ilTabs->activateTab("skills");
223  $form->setValuesByPost();
224  $tpl->setContent($form->getHtml());
225  }
226  }
initInputForm()
Init input form.
Import class.
+ Here is the call graph for this function:

◆ initInputForm()

ilSkillRootGUI::initInputForm ( )

Init input form.

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

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

Referenced by importSkills(), and showImportForm().

183  {
184  $lng = $this->lng;
185  $ilCtrl = $this->ctrl;
186 
187  $form = new ilPropertyFormGUI();
188 
189  $fi = new ilFileInputGUI($lng->txt("skmg_input_file"), "import_file");
190  $fi->setSuffixes(array("zip"));
191  $fi->setRequired(true);
192  $form->addItem($fi);
193 
194  // save and cancel commands
195  $form->addCommandButton("importSkills", $lng->txt("import"));
196  $form->addCommandButton("listSkills", $lng->txt("cancel"));
197 
198  $form->setTitle($lng->txt("skmg_import_skills"));
199  $form->setFormAction($ilCtrl->getFormAction($this));
200 
201  return $form;
202  }
This class represents a property form user interface.
This class represents a file property in a property form.
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 122 of file class.ilSkillRootGUI.php.

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

123  {
124  $tpl = $this->tpl;
125  $ilToolbar = $this->toolbar;
126  $ilCtrl = $this->ctrl;
127  $lng = $this->lng;
128  $ilTabs = $this->tabs;
129 
130  $skmg_set = new ilSetting("skmg");
131  $enable_skmg = $skmg_set->get("enable_skmg");
132  if (!$enable_skmg) {
133  ilUtil::sendInfo($lng->txt("skmg_skill_management_deactivated"));
134  }
135 
136  $this->getParentGUI()->showTree(false, $this, "listSkills");
137  $ilTabs->activateTab("skills");
138 
139  if ($this->checkPermissionBool("write")) {
141  }
142 
143  $table = new ilSkillCatTableGUI(
144  $this,
145  "listSkills",
146  (int) $_GET["obj_id"],
148  );
149 
150  $tpl->setContent($table->getHTML());
151  }
static addCreationButtons()
Add creation buttons.
$_GET["client_id"]
getParentGUI()
Get Parent GUI class (ilObjSCORM2004LearningModuleGUI).
checkPermissionBool($a_perm)
Check permission pool.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
+ Here is the call graph for this function:

◆ listTemplates()

ilSkillRootGUI::listTemplates ( )

List templates.

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

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

89  {
90  $tpl = $this->tpl;
91  $ilToolbar = $this->toolbar;
92  $ilCtrl = $this->ctrl;
93  $lng = $this->lng;
94  $ilTabs = $this->tabs;
95 
96  $skmg_set = new ilSetting("skmg");
97  $enable_skmg = $skmg_set->get("enable_skmg");
98  if (!$enable_skmg) {
99  ilUtil::sendInfo($lng->txt("skmg_skill_management_deactivated"));
100  }
101 
102  $this->getParentGUI()->showTree(true, $this, "listTemplates");
103  $ilTabs->activateTab("skill_templates");
104 
105  if ($this->checkPermissionBool("write")) {
107  }
108 
109  $table = new ilSkillCatTableGUI(
110  $this,
111  "listTemplates",
112  (int) $_GET["obj_id"],
114  );
115 
116  $tpl->setContent($table->getHTML());
117  }
$_GET["client_id"]
getParentGUI()
Get Parent GUI class (ilObjSCORM2004LearningModuleGUI).
checkPermissionBool($a_perm)
Check permission pool.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static addCreationButtons()
Add creation buttons.
+ Here is the call graph for this function:

◆ showImportForm()

ilSkillRootGUI::showImportForm ( )

Show import form.

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

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

171  {
172  $tpl = $this->tpl;
173  $ilTabs = $this->tabs;
174 
175  $ilTabs->activateTab("skills");
176  $tpl->setContent($this->initInputForm()->getHTML());
177  }
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 36 of file class.ilSkillRootGUI.php.

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

◆ $tabs

ilSkillRootGUI::$tabs
protected

◆ $toolbar

ilSkillRootGUI::$toolbar
protected

Definition at line 31 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: