ILIAS  release_8 Revision v8.24
ilSkillRootGUI Class Reference

Skill root GUI class. More...

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

Public Member Functions

 __construct (Tree\SkillTreeNodeManager $node_manager, int $a_node_id=0)
 
 getType ()
 
 executeCommand ()
 
 listTemplates ()
 
 listSkills ()
 
 cancelDelete ()
 
 showImportForm ()
 
 initInputForm ()
 
 importSkills ()
 
- Public Member Functions inherited from ilSkillTreeNodeGUI
 __construct (Tree\SkillTreeNodeManager $node_manager, int $a_node_id=0)
 
 isInUse ()
 
 setParentGUI (object $a_parentgui)
 
 getParentGUI ()
 
 readNodeObject (int $a_node_id)
 Get node object instance. More...
 
 saveAllTitles ()
 
 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 ()
 
 confirmedDelete ()
 confirmed delete More...
 
 setSkillNodeDescription ()
 
 create ()
 Create skill tree node. More...
 
 addStatusInput (ilPropertyFormGUI $a_form)
 
 editProperties ()
 
 getPropertyValues ()
 Get property values for edit form. More...
 
 save ()
 Save skill tree node. More...
 
 afterSave ()
 
 update ()
 Update skill tree node. More...
 
 afterUpdate ()
 
 initForm (string $a_mode="edit")
 
 cancelSave ()
 
 redirectToParent (bool $a_tmp_mode=false)
 Redirect to parent (identified by current node_id) More...
 
 saveOrder ()
 
 insertBasicSkillClip ()
 
 insertSkillCategoryClip ()
 
 insertTemplateReferenceClip ()
 
 insertSkillTemplateClip ()
 
 insertTemplateCategoryClip ()
 
 setTitleIcon ()
 
 addUsageTab (ilTabsGUI $a_tabs)
 
 showUsage ()
 
 addObjectsTab (ilTabsGUI $a_tabs)
 
 showObjects ()
 
 exportSelectedNodes ()
 

Protected Attributes

ilCtrl $ctrl
 
ilGlobalTemplateInterface $tpl
 
ilTabsGUI $tabs
 
ilToolbarGUI $toolbar
 
ilLanguage $lng
 
- Protected Attributes inherited from ilSkillTreeNodeGUI
ilCtrl $ctrl
 
ilLanguage $lng
 
ilLocatorGUI $locator
 
ilGlobalTemplateInterface $tpl
 
ilObjUser $user
 
ilTree $tree
 
ilPropertyFormGUI $form
 
object $parentgui
 
int $tref_id = 0
 
Tree SkillTreeNodeManager $skill_tree_node_manager
 
SkillTreeAccess $tree_access_manager
 
ilSkillTreeRepository $tree_repo
 
int $skill_tree_id = 0
 
ilTabsGUI $tabs
 
SkillAdminGUIRequest $admin_gui_request
 
int $requested_ref_id = 0
 
int $requested_node_id = 0
 
string $requested_backcmd = ""
 
int $requested_tmpmode = 0
 
int $base_skill_id = 0
 
array $requested_node_ids = []
 
array $requested_node_order = []
 

Additional Inherited Members

- Data Fields inherited from ilSkillTreeNodeGUI
object $node_object = null
 
bool $in_use = false
 
bool $use_checked = false
 
ilAccessHandler $access
 

Detailed Description

Skill root GUI class.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e @ilCtrl_isCalledBy ilSkillRootGUI: ilObjSkillManagementGUI, ilObjSkillTreeGUI

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

Constructor & Destructor Documentation

◆ __construct()

ilSkillRootGUI::__construct ( Tree\SkillTreeNodeManager  $node_manager,
int  $a_node_id = 0 
)

Reimplemented from ilSkillTreeNodeGUI.

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

37 {
38 global $DIC;
39
40 $this->ctrl = $DIC->ctrl();
41 $this->tpl = $DIC["tpl"];
42 $this->tabs = $DIC->tabs();
43 $this->toolbar = $DIC->toolbar();
44 $this->lng = $DIC->language();
45 $ilCtrl = $DIC->ctrl();
46
47 $ilCtrl->saveParameter($this, "node_id");
48
49 parent::__construct($node_manager, $a_node_id);
50 }
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ILIAS\Repository\tabs(), and ILIAS\Repository\toolbar().

+ Here is the call graph for this function:

Member Function Documentation

◆ cancelDelete()

ilSkillRootGUI::cancelDelete ( )

Reimplemented from ilSkillTreeNodeGUI.

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

135 : void
136 {
137 $ilCtrl = $this->ctrl;
138
139 if ($this->requested_tmpmode) {
140 $ilCtrl->redirect($this, "listTemplates");
141 } else {
142 $ilCtrl->redirect($this, "listSkills");
143 }
144 }
redirect(object $a_gui_obj, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
@inheritDoc

References $ctrl, and ilCtrl\redirect().

+ Here is the call graph for this function:

◆ executeCommand()

ilSkillRootGUI::executeCommand ( )

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

57 : void
58 {
59 $ilCtrl = $this->ctrl;
61 $ilTabs = $this->tabs;
62
63 $next_class = $ilCtrl->getNextClass($this);
64 $cmd = $ilCtrl->getCmd();
65
66 switch ($next_class) {
67 default:
68 $ret = $this->$cmd();
69 break;
70 }
71 }
ilGlobalTemplateInterface $tpl

References $ctrl, $tabs, and $tpl.

◆ getType()

ilSkillRootGUI::getType ( )

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

52 : string
53 {
54 return "skrt";
55 }

◆ importSkills()

ilSkillRootGUI::importSkills ( )

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

184 : void
185 {
188 $ilCtrl = $this->ctrl;
189 $ilTabs = $this->tabs;
190
191 $form = $this->initInputForm();
192 if ($form->checkInput()) {
193 $imp = new ilImport();
194 $conf = $imp->getConfig("Services/Skill");
195 $conf->setSkillTreeId($this->skill_tree_id);
196 $imp->importEntity($_FILES["import_file"]["tmp_name"], $_FILES["import_file"]["name"], "skmg", "Services/Skill");
197
198 $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
199 $ilCtrl->redirect($this, "listSkills");
200 } else {
201 $ilTabs->activateTab("skills");
204 }
205 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
setContent(string $a_html)
Sets content for standard template.

References $ctrl, ilSkillTreeNodeGUI\$form, $lng, $tabs, $tpl, ilPropertyFormGUI\checkInput(), ilPropertyFormGUI\getHTML(), initInputForm(), ilGlobalTemplateInterface\setContent(), ilPropertyFormGUI\setValuesByPost(), and ilLanguage\txt().

+ Here is the call graph for this function:

◆ initInputForm()

ilSkillRootGUI::initInputForm ( )

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

163 {
165 $ilCtrl = $this->ctrl;
166
167 $form = new ilPropertyFormGUI();
168
169 $fi = new ilFileInputGUI($lng->txt("skmg_input_file"), "import_file");
170 $fi->setSuffixes(array("zip"));
171 $fi->setRequired(true);
172 $form->addItem($fi);
173
174 // save and cancel commands
175 $form->addCommandButton("importSkills", $lng->txt("import"));
176 $form->addCommandButton("listSkills", $lng->txt("cancel"));
177
178 $form->setTitle($lng->txt("skmg_import_skills"));
179 $form->setFormAction($ilCtrl->getFormAction($this));
180
181 return $form;
182 }
This class represents a file property in a property form.
setFormAction(string $a_formaction)
This class represents a property form user interface.
addCommandButton(string $a_cmd, string $a_text, string $a_id="")

References $ctrl, ilSkillTreeNodeGUI\$form, $lng, ilPropertyFormGUI\addCommandButton(), ilPropertyFormGUI\addItem(), ilFormGUI\setFormAction(), ilPropertyFormGUI\setTitle(), and ilLanguage\txt().

Referenced by importSkills(), and showImportForm().

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

◆ listSkills()

ilSkillRootGUI::listSkills ( )

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

104 : void
105 {
107 $ilToolbar = $this->toolbar;
108 $ilCtrl = $this->ctrl;
110 $ilTabs = $this->tabs;
111
112 $skmg_set = new ilSetting("skmg");
113 $enable_skmg = $skmg_set->get("enable_skmg");
114 if (!$enable_skmg) {
115 $this->tpl->setOnScreenMessage('info', $lng->txt("skmg_skill_management_deactivated"));
116 }
117
118 $this->getParentGUI()->showTree(false, $this, "listSkills");
119 $ilTabs->activateTab("skills");
120
121 if ($this->tree_access_manager->hasManageCompetencesPermission()) {
123 }
124
125 $table = new ilSkillCatTableGUI(
126 $this,
127 "listSkills",
128 $this->requested_node_id,
130 );
131
132 $tpl->setContent($table->getHTML());
133 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References $ctrl, $lng, $tabs, $toolbar, $tpl, ilSkillCategoryGUI\addCreationButtons(), ilSkillTreeNodeGUI\getParentGUI(), ilSkillCatTableGUI\MODE_SCAT, ilGlobalTemplateInterface\setContent(), and ilLanguage\txt().

+ Here is the call graph for this function:

◆ listTemplates()

ilSkillRootGUI::listTemplates ( )

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

73 : void
74 {
76 $ilToolbar = $this->toolbar;
77 $ilCtrl = $this->ctrl;
79 $ilTabs = $this->tabs;
80
81 $skmg_set = new ilSetting("skmg");
82 $enable_skmg = $skmg_set->get("enable_skmg");
83 if (!$enable_skmg) {
84 $this->tpl->setOnScreenMessage('info', $lng->txt("skmg_skill_management_deactivated"));
85 }
86
87 $this->getParentGUI()->showTree(true, $this, "listTemplates");
88 $ilTabs->activateTab("skill_templates");
89
90 if ($this->tree_access_manager->hasManageCompetenceTemplatesPermission()) {
92 }
93
94 $table = new ilSkillCatTableGUI(
95 $this,
96 "listTemplates",
97 $this->requested_node_id,
99 );
100
101 $tpl->setContent($table->getHTML());
102 }

References $ctrl, $lng, $tabs, $toolbar, $tpl, ilSkillTemplateCategoryGUI\addCreationButtons(), ilSkillTreeNodeGUI\getParentGUI(), ilSkillCatTableGUI\MODE_SCTP, ilGlobalTemplateInterface\setContent(), and ilLanguage\txt().

+ Here is the call graph for this function:

◆ showImportForm()

ilSkillRootGUI::showImportForm ( )

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

146 : void
147 {
149 $ilTabs = $this->tabs;
152
153 $ilTabs->setBackTarget(
154 $lng->txt("back"),
155 $ctrl->getLinkTarget($this, "listSkills")
156 );
157
158 $ilTabs->activateTab("skills");
159 $tpl->setContent($this->initInputForm()->getHTML());
160 }
getLinkTarget(object $a_gui_obj, string $a_cmd=null, string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
@inheritDoc

References $ctrl, $lng, $tabs, $tpl, ilCtrl\getLinkTarget(), initInputForm(), ilGlobalTemplateInterface\setContent(), and ilLanguage\txt().

+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ilCtrl ilSkillRootGUI::$ctrl
protected

◆ $lng

ilLanguage ilSkillRootGUI::$lng
protected

◆ $tabs

ilTabsGUI ilSkillRootGUI::$tabs
protected

◆ $toolbar

ilToolbarGUI ilSkillRootGUI::$toolbar
protected

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

Referenced by listSkills(), and listTemplates().

◆ $tpl

ilGlobalTemplateInterface ilSkillRootGUI::$tpl
protected

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