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");
171 $this->form->addItem($ti);
177 $ni->setRequired(
true);
178 $this->form->addItem($ni);
182 "" => $lng->txt(
"please_select"),
184 foreach ($tmplts as $tmplt)
186 $options[$tmplt[
"child"]] = $tmplt[
"title"];
188 if ($a_mode !=
"edit")
192 $si->setRequired(
true);
193 $this->form->addItem(
$si);
199 $this->form->addItem($ne);
207 $cb->
setInfo($lng->txt(
"skmg_selectable_info"));
208 $this->form->addItem($cb);
210 if ($a_mode ==
"create")
212 $this->form->addCommandButton(
"save", $lng->txt(
"save"));
213 $this->form->addCommandButton(
"cancel", $lng->txt(
"cancel"));
214 $this->form->setTitle($lng->txt(
"skmg_new_sktr"));
218 $this->form->addCommandButton(
"updateSkillTemplateReference", $lng->txt(
"save"));
219 $this->form->setTitle($lng->txt(
"skmg_edit_sktr"));
222 $this->form->setFormAction($ilCtrl->getFormAction($this));
231 $values[
"skill_template_id"] = $this->node_object->getSkillTemplateId();
232 $values[
"title"] = $this->node_object->getTitle();
233 $values[
"selectable"] = $this->node_object->getSelfEvaluation();
234 $values[
"status"] = $this->node_object->getStatus();
235 $values[
"order_nr"] = $this->node_object->getOrderNr();
236 $this->form->setValuesByArray($values);
245 $sktr->setTitle(
$_POST[
"title"]);
246 $sktr->setSkillTemplateId(
$_POST[
"skill_template_id"]);
247 $sktr->setSelfEvaluation(
$_POST[
"selectable"]);
248 $sktr->setOrderNr(
$_POST[
"order_nr"]);
249 $sktr->setStatus(
$_POST[
"status"]);
252 $this->node_object = $sktr;
262 $ilCtrl->setParameterByClass(
"ilskilltemplatereferencegui",
"tref_id",
263 $this->node_object->getId());
264 $ilCtrl->setParameterByClass(
"ilskilltemplatereferencegui",
"obj_id",
265 $this->node_object->getSkillTemplateId());
266 $ilCtrl->redirectByClass(
"ilskilltemplatereferencegui",
"listItems");
277 if ($this->form->checkInput())
281 $this->node_object->setTitle(
$_POST[
"title"]);
282 $this->node_object->setSelfEvaluation(
$_POST[
"selectable"]);
283 $this->node_object->setOrderNr(
$_POST[
"order_nr"]);
284 $this->node_object->setStatus(
$_POST[
"status"]);
285 $this->node_object->update();
288 $ilCtrl->redirect($this,
"editProperties");
291 $this->form->setValuesByPost();
292 $tpl->setContent($this->form->getHtml());
305 $ilCtrl->redirectByClass(
"ilobjskillmanagementgui",
"editSkills");
317 $sk_id = $this->node_object->getSkillTemplateId();
320 if ($obj_type ==
"sctp")
322 include_once(
"./Services/Skill/classes/class.ilSkillCatTableGUI.php");
325 $tpl->setContent($table->getHTML());
327 else if ($obj_type ==
"sktp")
329 include_once(
"./Services/Skill/classes/class.ilSkillLevelTableGUI.php");
331 $tpl->setContent($table->getHTML());