42 $this->
ctrl = $DIC->ctrl();
43 $this->tpl = $DIC[
"tpl"];
44 $this->
tabs = $DIC->tabs();
45 $this->
lng = $DIC->language();
46 $this->
help = $DIC[
"ilHelp"];
47 $ilCtrl = $DIC->ctrl();
49 $ilCtrl->saveParameter($this,
"node_id");
50 $this->tref_id = $a_tref_id;
68 $next_class = $ilCtrl->getNextClass($this);
69 $cmd = $ilCtrl->getCmd();
71 switch ($next_class) {
78 public function setTabs(
string $a_tab): void
86 $ilTabs->clearTargets();
93 $ilCtrl->getLinkTarget($this,
'listItems')
98 if ($this->tref_id == 0) {
101 $lng->
txt(
"settings"),
102 $ilCtrl->getLinkTarget($this,
'editProperties')
109 $parent_node_id = $this->tree_repo->getParentNodeIdForNodeId($this->requested_node_id);
114 if ($this->tref_id == 0) {
115 if ($parent_type ===
"sctp") {
116 $ilCtrl->setParameter(
121 $ilTabs->setBackTarget(
123 $ilCtrl->getLinkTarget($this,
"listItems")
125 $ilCtrl->setParameter(
128 $this->requested_node_id
131 $ilCtrl->setParameterByClass(
134 $this->skill_tree_node_manager->getRootId()
136 $ilTabs->setBackTarget(
137 $lng->
txt(
"skmg_skill_templates"),
138 $ilCtrl->getLinkTargetByClass(
"ilskillrootgui",
"listTemplates")
140 $ilCtrl->setParameterByClass(
143 $this->requested_node_id
148 parent::setTitleIcon();
150 $lng->
txt(
"skmg_sctp") .
": " . $this->node_object->getTitle()
154 $ilTabs->activateTab($a_tab);
157 public function initForm(
string $a_mode =
"edit"): void
166 $ti->setMaxLength(200);
168 $ti->setRequired(
true);
169 $this->
form->addItem($ti);
174 $this->
form->addItem($ta);
177 if ($this->tree_access_manager->hasManageCompetenceTemplatesPermission()) {
178 if ($a_mode ==
"create") {
179 $this->
form->addCommandButton(
"save", $lng->
txt(
"save"));
180 $this->
form->addCommandButton(
"cancelSave", $lng->
txt(
"cancel"));
181 $this->
form->setTitle($lng->
txt(
"skmg_create_" . $this->getType()));
183 $this->
form->addCommandButton(
"update", $lng->
txt(
"save"));
184 $this->
form->setTitle($lng->
txt(
"skmg_edit_" . $this->getType()));
187 foreach ($this->
form->getItems() as $item) {
188 $item->setDisabled(
true);
192 $ilCtrl->setParameter($this,
"node_id", $this->requested_node_id);
193 $this->
form->setFormAction($ilCtrl->getFormAction($this));
202 $this->tpl->setOnScreenMessage(
'info', $lng->
txt(
"skmg_skill_in_use"));
205 if ($this->tree_access_manager->hasManageCompetenceTemplatesPermission()) {
206 if ($this->tref_id == 0) {
207 self::addCreationButtons();
216 $this->requested_node_id,
228 $ilCtrl = $DIC->ctrl();
229 $lng = $DIC->language();
230 $ilToolbar = $DIC->toolbar();
236 $ilCtrl->setParameterByClass(
"ilobjskillmanagementgui",
"tmpmode", 1);
238 $ilCtrl->setParameterByClass(
239 "ilbasicskilltemplategui",
243 $ilToolbar->addButton(
244 $lng->
txt(
"skmg_create_skill_template"),
245 $ilCtrl->getLinkTargetByClass(
"ilbasicskilltemplategui",
"create")
247 $ilCtrl->setParameterByClass(
248 "ilskilltemplatecategorygui",
252 $ilToolbar->addButton(
253 $lng->
txt(
"skmg_create_skill_template_category"),
254 $ilCtrl->getLinkTargetByClass(
"ilskilltemplatecategorygui",
"create")
259 if (
$ilUser->clipboardHasObjectsOfType(
"sktp")) {
260 $ilToolbar->addSeparator();
262 $ilToolbar->addButton(
263 $lng->
txt(
"skmg_insert_skill_template_from_clip"),
264 $ilCtrl->getLinkTargetByClass(
"ilskilltemplatecategorygui",
"insertSkillTemplateClip")
269 if (
$ilUser->clipboardHasObjectsOfType(
"sctp")) {
271 $ilToolbar->addSeparator();
274 $ilToolbar->addButton(
275 $lng->
txt(
"skmg_insert_template_category_from_clip"),
276 $ilCtrl->getLinkTargetByClass(
"ilskilltemplatecategorygui",
"insertTemplateCategoryClip")
284 parent::editProperties();
289 if (!$this->tree_access_manager->hasManageCompetenceTemplatesPermission()) {
294 $it->setTitle($this->
form->getInput(
"title"));
295 $it->setDescription($this->
form->getInput(
"description"));
302 if (!$this->tree_access_manager->hasManageCompetenceTemplatesPermission()) {
306 $this->node_object->setTitle($this->
form->getInput(
"title"));
307 $this->node_object->setDescription($this->
form->getInput(
"description"));
308 $this->node_object->setOrderNr((
int) $this->
form->getInput(
"order_nr"));
309 $this->node_object->setSelfEvaluation((
bool) $this->
form->getInput(
"self_eval"));
310 $this->node_object->update();
323 if ($this->tref_id > 0) {
333 $usages = $usage_info->getAllUsagesOfTemplate($this->requested_node_id);
336 foreach ($usages as $k => $usage) {
338 $html .= $tab->getHTML() .
"<br/><br/>";
346 parent::redirectToParent(
true);
redirectToParent(bool $a_tmp_mode=false)
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...
setSkillNodeDescription()
addUsageTab(ilTabsGUI $a_tabs)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupTitle(int $a_obj_id, int $a_tref_id=0)
initForm(string $a_mode="edit")
static _lookupType(int $a_obj_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.
Basic GUI class for skill tree nodes.
setScreenIdComponent(string $a_comp)
setTitle(string $a_title, bool $hidden=false)
Sets title in standard template.
TableGUI class for skill usages.
form( $class_path, string $cmd)
SkillAdminGUIRequest $admin_gui_request
Skill template category GUI class.
static addCreationButtons()
__construct(Container $dic, ilPlugin $plugin)
This class represents a text area property in a property form.
__construct(Tree\SkillTreeNodeManager $node_manager, int $a_node_id=0, int $a_tref_id=0)