5 include_once(
"./Services/Skill/classes/class.ilBasicSkillTemplateGUI.php");
6 include_once(
"./Services/Skill/classes/class.ilSkillTemplateReference.php");
26 $this->ctrl = $DIC->ctrl();
27 $this->tpl = $DIC[
"tpl"];
28 $this->tabs = $DIC->tabs();
29 $this->lng = $DIC->language();
30 $this->help = $DIC[
"ilHelp"];
33 $ilCtrl->saveParameter($this,
"obj_id");
34 $ilCtrl->saveParameter($this,
"tref_id");
36 parent::__construct($a_tref_id);
38 $this->tref_id = $a_tref_id;
39 if (is_object($this->node_object)) {
40 $this->base_skill_id = $this->node_object->getSkillTemplateId();
63 $next_class =
$ilCtrl->getNextClass($this);
66 switch ($next_class) {
84 $ilTabs->clearTargets();
85 $ilHelp->setScreenIdComponent(
"skmg_sktr");
87 if (is_object($this->node_object)) {
88 $sk_id = $this->node_object->getSkillTemplateId();
91 if ($obj_type ==
"sctp") {
96 $ilCtrl->getLinkTarget($this,
'listItems')
102 $lng->txt(
"skmg_skill_levels"),
103 $ilCtrl->getLinkTarget($this,
'listItems')
110 $lng->txt(
"settings"),
111 $ilCtrl->getLinkTarget($this,
'editProperties')
129 parent::setTitleIcon();
131 $lng->txt(
"skmg_sktr") .
": " . $this->node_object->getTitle() . $add
135 $ilTabs->activateTab($a_tab);
150 $ilCtrl->saveParameter($this,
"parent_id");
151 $ilCtrl->saveParameter($this,
"target");
153 $tpl->setContent($this->form->getHTML());
168 $tpl->setContent($this->form->getHTML());
181 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
185 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
191 $this->form->addItem($ti);
195 "" =>
$lng->txt(
"please_select"),
197 foreach ($tmplts as $tmplt) {
198 $options[$tmplt[
"child"]] = $tmplt[
"title"];
200 if ($a_mode !=
"edit") {
203 $si->setRequired(
true);
204 $this->form->addItem(
$si);
208 $this->form->addItem($ne);
217 $this->form->addItem($cb);
220 if ($a_mode ==
"create") {
221 $this->form->addCommandButton(
"save",
$lng->txt(
"save"));
222 $this->form->addCommandButton(
"cancel",
$lng->txt(
"cancel"));
223 $this->form->setTitle(
$lng->txt(
"skmg_new_sktr"));
225 $this->form->addCommandButton(
"updateSkillTemplateReference",
$lng->txt(
"save"));
226 $this->form->setTitle(
$lng->txt(
"skmg_edit_sktr"));
230 $this->form->setFormAction(
$ilCtrl->getFormAction($this));
239 $values[
"skill_template_id"] = $this->node_object->getSkillTemplateId();
240 $values[
"title"] = $this->node_object->getTitle();
241 $values[
"selectable"] = $this->node_object->getSelfEvaluation();
242 $values[
"status"] = $this->node_object->getStatus();
243 $this->form->setValuesByArray(
$values);
258 $sktr->setTitle(
$_POST[
"title"]);
259 $sktr->setSkillTemplateId(
$_POST[
"skill_template_id"]);
260 $sktr->setSelfEvaluation(
$_POST[
"selectable"]);
261 $sktr->setOrderNr(
$tree->getMaxOrderNr((
int)
$_GET[
"obj_id"]) + 10);
262 $sktr->setStatus(
$_POST[
"status"]);
265 $this->node_object = $sktr;
276 "ilskilltemplatereferencegui",
278 $this->node_object->getId()
281 "ilskilltemplatereferencegui",
283 $this->node_object->getSkillTemplateId()
285 $ilCtrl->redirectByClass(
"ilskilltemplatereferencegui",
"listItems");
302 if ($this->form->checkInput()) {
305 $this->node_object->setTitle(
$_POST[
"title"]);
306 $this->node_object->setSelfEvaluation(
$_POST[
"selectable"]);
307 $this->node_object->setStatus(
$_POST[
"status"]);
308 $this->node_object->update();
310 ilUtil::sendSuccess(
$lng->txt(
"msg_obj_modified"),
true);
311 $ilCtrl->redirect($this,
"editProperties");
314 $this->form->setValuesByPost();
315 $tpl->setContent($this->form->getHtml());
328 $ilCtrl->redirectByClass(
"ilobjskillmanagementgui",
"editSkills");
345 $sk_id = $this->node_object->getSkillTemplateId();
348 if ($obj_type ==
"sctp") {
349 include_once(
"./Services/Skill/classes/class.ilSkillCatTableGUI.php");
355 $this->node_object->getId()
358 } elseif ($obj_type ==
"sktp") {
359 include_once(
"./Services/Skill/classes/class.ilSkillLevelTableGUI.php");
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.
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.
initForm($a_mode="edit")
Init form.
static _lookupTitle($a_obj_id, $a_tref_id=0)
Lookup Title.
This class represents a non editable value in a property form.
if(empty($password)) $table
executeCommand()
Execute command.
Basic skill template GUI class.
addStatusInput(ilPropertyFormGUI $a_form)
Add status input.
static getTopTemplates()
Get top skill templates and template categories.