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");
29 parent::__construct($a_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();
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).
")";
113 parent::setTitleIcon();
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);
213 if ($a_mode ==
"create")
215 $this->form->addCommandButton(
"save", $lng->txt(
"save"));
216 $this->form->addCommandButton(
"cancel", $lng->txt(
"cancel"));
217 $this->form->setTitle($lng->txt(
"skmg_new_sktr"));
220 $this->form->addCommandButton(
"updateSkillTemplateReference", $lng->txt(
"save"));
221 $this->form->setTitle($lng->txt(
"skmg_edit_sktr"));
225 $this->form->setFormAction($ilCtrl->getFormAction($this));
234 $values[
"skill_template_id"] = $this->node_object->getSkillTemplateId();
235 $values[
"title"] = $this->node_object->getTitle();
236 $values[
"selectable"] = $this->node_object->getSelfEvaluation();
237 $values[
"status"] = $this->node_object->getStatus();
238 $values[
"order_nr"] = $this->node_object->getOrderNr();
239 $this->form->setValuesByArray($values);
253 $sktr->setTitle(
$_POST[
"title"]);
254 $sktr->setSkillTemplateId(
$_POST[
"skill_template_id"]);
255 $sktr->setSelfEvaluation(
$_POST[
"selectable"]);
256 $sktr->setOrderNr(
$_POST[
"order_nr"]);
257 $sktr->setStatus(
$_POST[
"status"]);
260 $this->node_object = $sktr;
270 $ilCtrl->setParameterByClass(
"ilskilltemplatereferencegui",
"tref_id",
271 $this->node_object->getId());
272 $ilCtrl->setParameterByClass(
"ilskilltemplatereferencegui",
"obj_id",
273 $this->node_object->getSkillTemplateId());
274 $ilCtrl->redirectByClass(
"ilskilltemplatereferencegui",
"listItems");
290 if ($this->form->checkInput())
294 $this->node_object->setTitle(
$_POST[
"title"]);
295 $this->node_object->setSelfEvaluation(
$_POST[
"selectable"]);
296 $this->node_object->setOrderNr(
$_POST[
"order_nr"]);
297 $this->node_object->setStatus(
$_POST[
"status"]);
298 $this->node_object->update();
301 $ilCtrl->redirect($this,
"editProperties");
304 $this->form->setValuesByPost();
305 $tpl->setContent($this->form->getHtml());
318 $ilCtrl->redirectByClass(
"ilobjskillmanagementgui",
"editSkills");
335 $sk_id = $this->node_object->getSkillTemplateId();
338 if ($obj_type ==
"sctp")
340 include_once(
"./Services/Skill/classes/class.ilSkillCatTableGUI.php");
343 $tpl->setContent($table->getHTML());
345 else if ($obj_type ==
"sktp")
347 include_once(
"./Services/Skill/classes/class.ilSkillLevelTableGUI.php");
349 $tpl->setContent($table->getHTML());
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
addUsageTab($a_tabs)
Add usage tab.
setValue($a_value)
Set Value.
Skill Template Reference.
setSkillNodeDescription()
Set skill node description.
getValues()
Get current values for from.
__construct($a_tref_id=0)
Constructor.
static putInTree($a_obj, $a_parent_id="", $a_target_node_id="")
Put this object into the skill tree.
static _lookupType($a_obj_id)
Lookup Type.
checkPermissionBool($a_perm)
Check permission pool.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
if(!is_array($argv)) $options
editProperties()
Edit properties.
setTabs($a_tab="")
output tabs
Skill template reference GUI class.
This class represents a text property in a property form.
static _lookupTemplateId($a_obj_id)
Lookup template ID.
updateSkillTemplateReference()
Update form.
Create styles array
The data for the language used.
initForm($a_mode="edit")
Init form.
This class represents a non editable value in a property form.
executeCommand()
Execute command.
Basic skill template GUI class.
addStatusInput(ilPropertyFormGUI $a_form)
Add status input.
static getTopTemplates()
Get top skill templates and template categories.