5 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
36 $this->node_object = null;
37 $this->access = $ilAccess;
38 $this->ref_id = (int)
$_GET[
"ref_id"];
55 return $this->access->checkAccess($a_perm,
"", $this->ref_id);
66 $this->parentgui = $a_parentgui;
76 return $this->parentgui;
84 include_once(
"./Services/Skill/classes/class.ilSkillTreeNodeFactory.php");
96 $ilCtrl->redirect($this,
"showOrganization");
106 $ilCtrl->setParameter($this,
"backcmd",
$_GET[
"backcmd"]);
117 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
119 if (!is_array(
$_POST[
"id"]) || count(
$_POST[
"id"]) == 0)
126 foreach($items as $k => $item)
133 foreach($todel as $k)
140 ilUtil::sendInfo($lng->txt(
"skmg_insert_please_choose_one_type_only"),
true);
146 include_once(
"./Modules/LearningModule/classes/class.ilEditClipboard.php");
164 if (!is_array(
$_POST[
"id"]) || count(
$_POST[
"id"]) == 0)
169 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
173 foreach($items as $k => $item)
180 foreach($todel as $k)
186 ilUtil::sendInfo($lng->txt(
"skmg_insert_please_choose_one_type_only"),
true);
192 include_once(
"./Modules/LearningModule/classes/class.ilEditClipboard.php");
235 $ilLocator->addRepositoryItems(
$_GET[
"ref_id"]);
238 if (
$_GET[
"obj_id"] > 0)
240 include_once(
"./Services/Skill/classes/class.ilSkillTree.php");
243 for( $i = 1; $i < count(
$path); $i++)
245 switch(
$path[$i][
"type"])
248 $ilCtrl->setParameterByClass(
"ilskillcategorygui",
"obj_id",
250 $ilLocator->addItem(
$path[$i][
"title"],
251 $ilCtrl->getLinkTargetByClass(
"ilskillmanagementgui",
252 "ilskillcategorygui"),
"", 0,
$path[$i][
"type"],
257 $ilCtrl->setParameterByClass(
"ilbasicskillgui",
"obj_id",
259 $ilLocator->addItem(
$path[$i][
"title"],
260 $ilCtrl->getLinkTargetByClass(
"ilskillmanagementgui",
261 "ilbasicskillgui"),
"", 0,
$path[$i][
"type"],
268 $ilCtrl->setParameter($this,
"obj_id",
$_GET[
"obj_id"]);
280 if (is_object($this->node_object))
282 include_once(
"./Services/Skill/classes/class.ilSkillTree.php");
284 $path = $this->node_object->skill_tree->getSkillTreePath($this->node_object->getId(),
287 foreach (
$path as $p)
289 if (in_array($p[
"type"], array(
"scat",
"skll",
"sktr")))
291 $desc.= $sep.$p[
"title"];
296 $tpl->setDescription($desc);
307 $tpl->setContent($this->form->getHTML());
324 $radg->addOption($op);
338 $tpl->setContent($this->form->getHTML());
348 $values[
"title"] = $this->node_object->getTitle();
349 $values[
"order_nr"] = $this->node_object->getOrderNr();
350 $values[
"self_eval"] = $this->node_object->getSelfEvaluation();
351 $values[
"status"] = $this->node_object->getStatus();
353 $this->form->setValuesByArray($values);
370 if ($this->form->checkInput())
375 in_array($this->getType(), array(
"sktp",
"sctp")));
380 $this->form->setValuesByPost();
381 $tpl->setContent($this->form->getHtml());
408 if ($this->form->checkInput())
416 $this->form->setValuesByPost();
417 $tpl->setContent($this->form->getHtml());
428 $ilCtrl->redirect($this,
"editProperties");
440 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
447 $ti->setRequired(
true);
448 $this->form->addItem($ti);
454 $ni->setRequired(
true);
455 $this->form->addItem($ni);
460 if ($a_mode ==
"create")
462 $this->form->addCommandButton(
"save", $lng->txt(
"save"));
463 $this->form->addCommandButton(
"cancelSave", $lng->txt(
"cancel"));
464 $this->form->setTitle($lng->txt(
"skmg_create_" . $this->getType()));
467 $this->form->addCommandButton(
"update", $lng->txt(
"save"));
468 $this->form->setTitle($lng->txt(
"skmg_edit_" . $this->getType()));
472 $ilCtrl->setParameter($this,
"obj_id",
$_GET[
"obj_id"]);
473 $this->form->setFormAction($ilCtrl->getFormAction($this));
498 if (
$_GET[
"tmpmode"])
508 $ilCtrl->setParameterByClass(
"ilskillrootgui",
"obj_id", (
int) $_GET[
"obj_id"]);
511 $ilCtrl->redirectByClass(
"ilskillrootgui",
"listTemplates");
515 $ilCtrl->redirectByClass(
"ilskillrootgui",
"listSkills");
520 $ilCtrl->setParameterByClass(
"ilskilltemplatecategorygui",
"obj_id", (
int) $_GET[
"obj_id"]);
521 $ilCtrl->redirectByClass(
"ilskilltemplatecategorygui",
"listItems");
525 $ilCtrl->setParameterByClass(
"ilskillcategorygui",
"obj_id", (
int) $_GET[
"obj_id"]);
526 $ilCtrl->redirectByClass(
"ilskillcategorygui",
"listItems");
545 (
int) $_GET[
"tmpmode"]);
557 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
569 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
581 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
593 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
605 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
617 $obj_id = (is_object($this->node_object))
618 ? $this->node_object->getId()
622 $obj_id, $this->getType(),
"",
640 $a_tabs->addTab(
"usage",
641 $lng->txt(
"skmg_usage"),
642 $ilCtrl->getLinkTarget($this,
"showUsage"));
653 $this->setTabs(
"usage");
655 include_once(
"./Services/Skill/classes/class.ilSkillUsage.php");
657 $base_skill_id = ($this->base_skill_id > 0)
658 ? $this->base_skill_id
659 : $this->node_object->getId();
660 $usages = $usage_info->getAllUsagesInfoOfSubtree($base_skill_id.
":".$this->tref_id);
663 include_once(
"./Services/Skill/classes/class.ilSkillUsageTableGUI.php");
664 foreach ($usages as $k => $usage)
670 $tpl->setContent(
$html);
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
readNodeObject($a_node_id)
Get node object instance.
redirectToParent($a_tmp_mode=false)
Redirect to parent (identified by current obj_id)
cutItems()
Copy items to clipboard, then cut them from the current tree.
This class represents an option in a radio group.
insertTemplateReferenceClip()
Insert skill template references from clipboard.
addUsageTab($a_tabs)
Add usage tab.
static getAllStatus()
Get all status.
setSkillNodeDescription()
Set skill node description.
setLocator()
Set Locator Items.
static getIconPath($a_obj_id, $a_type, $a_size="", $a_status=0)
Get icon path.
update()
Update skill tree node.
static insertItemsFromClip($a_type, $a_obj_id)
Insert basic skills from clipboard.
showUsage()
Show skill usage.
getParentGUI()
Get Parent GUI class (ilObjSCORM2004LearningModuleGUI).
deleteNodes()
Delete nodes in the hierarchy.
setTitleIcon()
Set title icon.
getPropertyValues()
Get property values for edit form.
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.
copyItems()
Copy items to clipboard.
cancelDelete()
cancel delete
create()
Create skill tree node.
static uniqueTypesCheck($a_items)
Check for unique types.
static getInstance($a_id=0)
Basic GUI class for skill tree nodes.
confirmedDelete()
confirmed delete
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
saveAllTitles()
Save Titles.
cancelSave()
Cancel saving.
This class represents a text property in a property form.
static clipboardCopy($a_tree_id, $a_ids)
Copy a set of skills/skill categories into the clipboard.
setMaxLength($a_maxlength)
Set Max Length.
editProperties()
Edit properties form.
initForm($a_mode="edit")
Init form.
afterUpdate()
After update.
TableGUI class for skill usages.
ilSkillTreeNodeGUI($a_node_id=0)
constructor
save()
Save skill tree node.
static saveChildsOrder($a_par_id, $a_childs_order, $a_templates=false)
Save childs order.
static stripSlashesArray($a_arr, $a_strip_html=true, $a_allow="")
Strip slashes from array.
static getStatusInfo($a_status)
Get status info.
insertBasicSkillClip()
Insert basic skills from clipboard.
insertSkillCategoryClip()
Insert skill categories from clipboard.
clipboardCut($a_tree_id, $a_ids)
Cut and copy a set of skills/skill categories into the clipboard.
insertSkillTemplateClip()
Insert skill template from clipboard.
static _lookupStatus($a_obj_id)
Lookup Status.
setParentGUI($a_parentgui)
Set Parent GUI class.
addStatusInput(ilPropertyFormGUI $a_form)
Add status input.
insertTemplateCategoryClip()
Insert skill template category from clipboard.