ILIAS  trunk Revision v11.0_alpha-1846-g895b5f47236
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilSkillRootGUI Class Reference

Skill root GUI class. More...

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

Public Member Functions

 __construct (Node\SkillTreeNodeManager $node_manager, int $a_node_id=0)
 
 getType ()
 
 executeCommand ()
 
 listTemplates ()
 
 listSkills ()
 
 cancelDelete ()
 
 showImportForm ()
 
 initInputForm ()
 
 importSkills ()
 
- Public Member Functions inherited from ilSkillTreeNodeGUI
 __construct (Node\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
 
UI Factory $ui_fac
 
UI Renderer $ui_ren
 
object $parentgui
 
int $tref_id = 0
 
Node SkillTreeNodeManager $skill_tree_node_manager
 
SkillTreeAccess $tree_access_manager
 
Table TableManager $table_manager
 
Usage SkillUsageManager $usage_manager
 
ilSkillTreeRepository $tree_repo
 
int $skill_tree_id = 0
 
ilTabsGUI $tabs
 
SkillAdminGUIRequest $admin_gui_request
 
SkillUIService $skill_ui_service
 
int $requested_ref_id = 0
 
int $requested_node_id = 0
 
string $requested_backcmd = ""
 
bool $requested_tmpmode = false
 
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

Constructor & Destructor Documentation

◆ __construct()

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

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

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

38  {
39  global $DIC;
40 
41  $this->ctrl = $DIC->ctrl();
42  $this->tpl = $DIC["tpl"];
43  $this->tabs = $DIC->tabs();
44  $this->toolbar = $DIC->toolbar();
45  $this->lng = $DIC->language();
46  $ilCtrl = $DIC->ctrl();
47 
48  $ilCtrl->saveParameter($this, "node_id");
49 
50  parent::__construct($node_manager, $a_node_id);
51  }
global $DIC
Definition: shib_login.php:22
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ cancelDelete()

ilSkillRootGUI::cancelDelete ( )

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

References $ctrl, and ilCtrl\redirect().

136  : void
137  {
138  $ilCtrl = $this->ctrl;
139 
140  if ($this->requested_tmpmode) {
141  $ilCtrl->redirect($this, "listTemplates");
142  } else {
143  $ilCtrl->redirect($this, "listSkills");
144  }
145  }
redirect(object $a_gui_obj, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false)
+ Here is the call graph for this function:

◆ executeCommand()

ilSkillRootGUI::executeCommand ( )

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

References $ctrl, $tabs, and $tpl.

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

◆ getType()

ilSkillRootGUI::getType ( )

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

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

◆ importSkills()

ilSkillRootGUI::importSkills ( )

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

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

185  : void
186  {
187  $tpl = $this->tpl;
188  $lng = $this->lng;
189  $ilCtrl = $this->ctrl;
190  $ilTabs = $this->tabs;
191 
192  $form = $this->initInputForm();
193  if ($form->checkInput()) {
194  $imp = new ilImport();
195  $conf = $imp->getConfig("components/ILIAS/Skill");
196  $conf->setSkillTreeId($this->skill_tree_id);
197  $imp->importEntity($_FILES["import_file"]["tmp_name"], $_FILES["import_file"]["name"], "skmg", "components/ILIAS/Skill");
198 
199  $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
200  $ilCtrl->redirect($this, "listSkills");
201  } else {
202  $ilTabs->activateTab("skills");
205  }
206  }
ilGlobalTemplateInterface $tpl
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...
Import class.
setContent(string $a_html)
Sets content for standard template.
+ Here is the call graph for this function:

◆ initInputForm()

ilSkillRootGUI::initInputForm ( )

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

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

Referenced by importSkills(), and showImportForm().

164  {
165  $lng = $this->lng;
166  $ilCtrl = $this->ctrl;
167 
168  $form = new ilPropertyFormGUI();
169 
170  $fi = new ilFileInputGUI($lng->txt("skmg_input_file"), "import_file");
171  $fi->setSuffixes(array("zip"));
172  $fi->setRequired(true);
173  $form->addItem($fi);
174 
175  // save and cancel commands
176  $form->addCommandButton("importSkills", $lng->txt("import"));
177  $form->addCommandButton("listSkills", $lng->txt("cancel"));
178 
179  $form->setTitle($lng->txt("skmg_import_skills"));
180  $form->setFormAction($ilCtrl->getFormAction($this));
181 
182  return $form;
183  }
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...
This class represents a file property in a property form.
setSuffixes(array $a_suffixes)
setFormAction(string $a_formaction)
addCommandButton(string $a_cmd, string $a_text, string $a_id="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ listSkills()

ilSkillRootGUI::listSkills ( )

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

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

105  : void
106  {
107  $tpl = $this->tpl;
108  $ilToolbar = $this->toolbar;
109  $ilCtrl = $this->ctrl;
110  $lng = $this->lng;
111  $ilTabs = $this->tabs;
112 
113  $skmg_set = new ilSetting("skmg");
114  $enable_skmg = $skmg_set->get("enable_skmg");
115  if (!$enable_skmg) {
116  $this->tpl->setOnScreenMessage('info', $lng->txt("skmg_skill_management_deactivated"));
117  }
118 
119  $this->getParentGUI()->showTree(false, $this, "listSkills");
120  $ilTabs->activateTab("skills");
121 
122  if ($this->tree_access_manager->hasManageCompetencesPermission()) {
124  }
125 
126  $table = new ilSkillCatTableGUI(
127  $this,
128  "listSkills",
129  $this->requested_node_id,
131  );
132 
133  $tpl->setContent($table->getHTML());
134  }
ilGlobalTemplateInterface $tpl
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.
+ Here is the call graph for this function:

◆ listTemplates()

ilSkillRootGUI::listTemplates ( )

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

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

74  : void
75  {
76  $tpl = $this->tpl;
77  $ilToolbar = $this->toolbar;
78  $ilCtrl = $this->ctrl;
79  $lng = $this->lng;
80  $ilTabs = $this->tabs;
81 
82  $skmg_set = new ilSetting("skmg");
83  $enable_skmg = $skmg_set->get("enable_skmg");
84  if (!$enable_skmg) {
85  $this->tpl->setOnScreenMessage('info', $lng->txt("skmg_skill_management_deactivated"));
86  }
87 
88  $this->getParentGUI()->showTree(true, $this, "listTemplates");
89  $ilTabs->activateTab("skill_templates");
90 
91  if ($this->tree_access_manager->hasManageCompetenceTemplatesPermission()) {
93  }
94 
95  $table = new ilSkillCatTableGUI(
96  $this,
97  "listTemplates",
98  $this->requested_node_id,
100  );
101 
102  $tpl->setContent($table->getHTML());
103  }
ilGlobalTemplateInterface $tpl
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.
+ Here is the call graph for this function:

◆ showImportForm()

ilSkillRootGUI::showImportForm ( )

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

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

147  : void
148  {
149  $tpl = $this->tpl;
150  $ilTabs = $this->tabs;
151  $lng = $this->lng;
152  $ctrl = $this->ctrl;
153 
154  $ilTabs->setBackTarget(
155  $lng->txt("back"),
156  $ctrl->getLinkTarget($this, "listSkills")
157  );
158 
159  $ilTabs->activateTab("skills");
160  $tpl->setContent($this->initInputForm()->getHTML());
161  }
ilGlobalTemplateInterface $tpl
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...
getLinkTarget(object $a_gui_obj, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
setContent(string $a_html)
Sets content for standard template.
+ 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 34 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: