5 include_once(
"./Services/Skill/classes/class.ilBasicSkillTemplateGUI.php");
6 include_once(
"./Services/Skill/classes/class.ilSkillTemplateReference.php");
26 $ilCtrl->saveParameter($this,
"obj_id");
27 $ilCtrl->saveParameter($this,
"tref_id");
31 $this->tref_id = $a_tref_id;
32 if (is_object($this->node_object))
34 $this->base_skill_id = $this->node_object->getSkillTemplateId();
53 $tpl->getStandardTemplate();
55 $next_class = $ilCtrl->getNextClass($this);
56 $cmd = $ilCtrl->getCmd();
73 $ilTabs->clearTargets();
74 $ilHelp->setScreenIdComponent(
"skmg_sktr");
76 if (is_object($this->node_object))
78 $sk_id = $this->node_object->getSkillTemplateId();
81 if ($obj_type ==
"sctp")
84 $ilTabs->addTab(
"content", $lng->txt(
"content"),
85 $ilCtrl->getLinkTarget($this,
'listItems'));
90 $ilTabs->addTab(
"content", $lng->txt(
"skmg_skill_levels"),
91 $ilCtrl->getLinkTarget($this,
'listItems'));
95 $ilTabs->addTab(
"properties", $lng->txt(
"settings"),
96 $ilCtrl->getLinkTarget($this,
'editProperties'));
111 $add =
" (".ilSkillTreeNode::_lookupTitle($tid).
")";
115 $lng->txt(
"skmg_sktr").
": ".$this->node_object->getTitle().$add);
118 $ilTabs->activateTab($a_tab);
132 $ilCtrl->saveParameter($this,
"parent_id");
133 $ilCtrl->saveParameter($this,
"target");
135 $tpl->setContent($this->form->getHTML());
150 $tpl->setContent($this->form->getHTML());
162 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
166 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
172 $this->form->addItem($ti);
178 $ni->setRequired(
true);
179 $this->form->addItem($ni);
183 "" => $lng->txt(
"please_select"),
185 foreach ($tmplts as $tmplt)
187 $options[$tmplt[
"child"]] = $tmplt[
"title"];
189 if ($a_mode !=
"edit")
193 $si->setRequired(
true);
194 $this->form->addItem(
$si);
200 $this->form->addItem($ne);
208 $cb->
setInfo($lng->txt(
"skmg_selectable_info"));
209 $this->form->addItem($cb);
211 if ($a_mode ==
"create")
213 $this->form->addCommandButton(
"save", $lng->txt(
"save"));
214 $this->form->addCommandButton(
"cancel", $lng->txt(
"cancel"));
215 $this->form->setTitle($lng->txt(
"skmg_new_sktr"));
219 $this->form->addCommandButton(
"updateSkillTemplateReference", $lng->txt(
"save"));
220 $this->form->setTitle($lng->txt(
"skmg_edit_sktr"));
223 $this->form->setFormAction($ilCtrl->getFormAction($this));
232 $values[
"skill_template_id"] = $this->node_object->getSkillTemplateId();
233 $values[
"title"] = $this->node_object->getTitle();
234 $values[
"selectable"] = $this->node_object->getSelfEvaluation();
235 $values[
"status"] = $this->node_object->getStatus();
236 $values[
"order_nr"] = $this->node_object->getOrderNr();
237 $this->form->setValuesByArray($values);
246 $sktr->setTitle(
$_POST[
"title"]);
247 $sktr->setSkillTemplateId(
$_POST[
"skill_template_id"]);
248 $sktr->setSelfEvaluation(
$_POST[
"selectable"]);
249 $sktr->setOrderNr(
$_POST[
"order_nr"]);
250 $sktr->setStatus(
$_POST[
"status"]);
253 $this->node_object = $sktr;
263 $ilCtrl->setParameterByClass(
"ilskilltemplatereferencegui",
"tref_id",
264 $this->node_object->getId());
265 $ilCtrl->setParameterByClass(
"ilskilltemplatereferencegui",
"obj_id",
266 $this->node_object->getSkillTemplateId());
267 $ilCtrl->redirectByClass(
"ilskilltemplatereferencegui",
"listItems");
278 if ($this->form->checkInput())
282 $this->node_object->setTitle(
$_POST[
"title"]);
283 $this->node_object->setSelfEvaluation(
$_POST[
"selectable"]);
284 $this->node_object->setOrderNr(
$_POST[
"order_nr"]);
285 $this->node_object->setStatus(
$_POST[
"status"]);
286 $this->node_object->update();
289 $ilCtrl->redirect($this,
"editProperties");
292 $this->form->setValuesByPost();
293 $tpl->setContent($this->form->getHtml());
306 $ilCtrl->redirectByClass(
"ilobjskillmanagementgui",
"editSkills");
318 $sk_id = $this->node_object->getSkillTemplateId();
321 if ($obj_type ==
"sctp")
323 include_once(
"./Services/Skill/classes/class.ilSkillCatTableGUI.php");
326 $tpl->setContent($table->getHTML());
328 else if ($obj_type ==
"sktp")
330 include_once(
"./Services/Skill/classes/class.ilSkillLevelTableGUI.php");
332 $tpl->setContent($table->getHTML());