5include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
38 $this->node_object =
null;
39 $this->access = $ilAccess;
40 $this->ref_id = (int)
$_GET[
"ref_id"];
57 if (!is_object($this->node_object))
61 if ($this->use_checked)
66 include_once(
"./Services/Skill/classes/class.ilSkillUsage.php");
68 $usages = $u->getAllUsagesInfoOfSubtrees($cskill_ids);
69 if (count($usages) > 0)
74 $this->in_use =
false;
87 return $this->access->checkAccess($a_perm,
"", $this->ref_id);
98 $this->parentgui = $a_parentgui;
108 return $this->parentgui;
116 include_once(
"./Services/Skill/classes/class.ilSkillTreeNodeFactory.php");
128 $ilCtrl->redirect($this,
"showOrganization");
138 $ilCtrl->setParameter($this,
"backcmd",
$_GET[
"backcmd"]);
149 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
151 if (!is_array(
$_POST[
"id"]) || count(
$_POST[
"id"]) == 0)
158 foreach($items as $k => $item)
165 foreach($todel as $k)
178 include_once(
"./Modules/LearningModule/classes/class.ilEditClipboard.php");
196 if (!is_array(
$_POST[
"id"]) || count(
$_POST[
"id"]) == 0)
201 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
205 foreach($items as $k => $item)
212 foreach($todel as $k)
224 include_once(
"./Modules/LearningModule/classes/class.ilEditClipboard.php");
267 $ilLocator->addRepositoryItems(
$_GET[
"ref_id"]);
270 if (
$_GET[
"obj_id"] > 0)
272 include_once(
"./Services/Skill/classes/class.ilSkillTree.php");
275 for( $i = 1; $i < count(
$path); $i++)
277 switch(
$path[$i][
"type"])
280 $ilCtrl->setParameterByClass(
"ilskillcategorygui",
"obj_id",
282 $ilLocator->addItem(
$path[$i][
"title"],
283 $ilCtrl->getLinkTargetByClass(
"ilskillmanagementgui",
284 "ilskillcategorygui"),
"", 0,
$path[$i][
"type"],
289 $ilCtrl->setParameterByClass(
"ilbasicskillgui",
"obj_id",
291 $ilLocator->addItem(
$path[$i][
"title"],
292 $ilCtrl->getLinkTargetByClass(
"ilskillmanagementgui",
293 "ilbasicskillgui"),
"", 0,
$path[$i][
"type"],
300 $ilCtrl->setParameter($this,
"obj_id",
$_GET[
"obj_id"]);
312 if (is_object($this->node_object))
314 include_once(
"./Services/Skill/classes/class.ilSkillTree.php");
316 $path = $this->node_object->skill_tree->getSkillTreePath($this->node_object->getId(),
319 foreach (
$path as $p)
321 if (in_array($p[
"type"], array(
"scat",
"skll",
"sktr")))
323 $desc.= $sep.$p[
"title"];
328 $tpl->setDescription($desc);
339 $tpl->setContent($this->form->getHTML());
356 $radg->addOption($op);
375 $tpl->setContent($this->form->getHTML());
385 $values[
"title"] = $this->node_object->getTitle();
386 $values[
"order_nr"] = $this->node_object->getOrderNr();
387 $values[
"self_eval"] = $this->node_object->getSelfEvaluation();
388 $values[
"status"] = $this->node_object->getStatus();
390 $this->form->setValuesByArray($values);
407 if ($this->form->checkInput())
412 in_array($this->getType(), array(
"sktp",
"sctp")));
417 $this->form->setValuesByPost();
418 $tpl->setContent($this->form->getHtml());
445 if ($this->form->checkInput())
453 $this->form->setValuesByPost();
454 $tpl->setContent($this->form->getHtml());
465 $ilCtrl->redirect($this,
"editProperties");
477 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
482 $ti->setMaxLength(200);
484 $ti->setRequired(
true);
485 $this->form->addItem($ti);
489 $ni->setMaxLength(6);
491 $ni->setRequired(
true);
492 $this->form->addItem($ni);
497 if ($a_mode ==
"create")
499 $this->form->addCommandButton(
"save",
$lng->txt(
"save"));
500 $this->form->addCommandButton(
"cancelSave",
$lng->txt(
"cancel"));
501 $this->form->setTitle(
$lng->txt(
"skmg_create_" . $this->getType()));
504 $this->form->addCommandButton(
"update",
$lng->txt(
"save"));
505 $this->form->setTitle(
$lng->txt(
"skmg_edit_" . $this->getType()));
509 $ilCtrl->setParameter($this,
"obj_id",
$_GET[
"obj_id"]);
510 $this->form->setFormAction(
$ilCtrl->getFormAction($this));
535 if (
$_GET[
"tmpmode"])
545 $ilCtrl->setParameterByClass(
"ilskillrootgui",
"obj_id", (
int)
$_GET[
"obj_id"]);
548 $ilCtrl->redirectByClass(
"ilskillrootgui",
"listTemplates");
552 $ilCtrl->redirectByClass(
"ilskillrootgui",
"listSkills");
557 $ilCtrl->setParameterByClass(
"ilskilltemplatecategorygui",
"obj_id", (
int)
$_GET[
"obj_id"]);
558 $ilCtrl->redirectByClass(
"ilskilltemplatecategorygui",
"listItems");
562 $ilCtrl->setParameterByClass(
"ilskillcategorygui",
"obj_id", (
int)
$_GET[
"obj_id"]);
563 $ilCtrl->redirectByClass(
"ilskillcategorygui",
"listItems");
582 (
int) $_GET[
"tmpmode"]);
594 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
606 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
618 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
630 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
642 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
654 $obj_id = (is_object($this->node_object))
655 ? $this->node_object->getId()
659 $obj_id, $this->getType(),
"",
677 $a_tabs->addTab(
"usage",
678 $lng->txt(
"skmg_usage"),
679 $ilCtrl->getLinkTarget($this,
"showUsage"));
690 $this->setTabs(
"usage");
692 include_once(
"./Services/Skill/classes/class.ilSkillUsage.php");
694 $base_skill_id = ($this->base_skill_id > 0)
695 ? $this->base_skill_id
696 : $this->node_object->getId();
697 $usages = $usage_info->getAllUsagesInfoOfSubtree($base_skill_id.
":".$this->tref_id);
700 include_once(
"./Services/Skill/classes/class.ilSkillUsageTableGUI.php");
701 foreach ($usages as $k => $usage)
717 if (!is_array(
$_POST[
"id"]) || count(
$_POST[
"id"]) == 0)
722 include_once(
"./Services/Export/classes/class.ilExport.php");
724 $conf = $exp->getConfig(
"Services/Skill");
725 $conf->setSelectedNodes(
$_POST[
"id"]);
728 $ilCtrl->redirectByClass(array(
"iladministrationgui",
"ilobjskillmanagementgui",
"ilexportgui"),
"");
An exception for terminatinating execution or to throw for unit testing.
static setAction($a_action)
static _lookupObjId($a_id)
This class represents an option in a radio group.
static getInstance($a_id=0)
Basic GUI class for skill tree nodes.
redirectToParent($a_tmp_mode=false)
Redirect to parent (identified by current obj_id)
exportSelectedNodes()
Export seleced nodes.
afterUpdate()
After update.
insertSkillTemplateClip()
Insert skill template from clipboard.
showUsage()
Show skill usage.
save()
Save skill tree node.
insertBasicSkillClip()
Insert basic skills from clipboard.
setTitleIcon()
Set title icon.
confirmedDelete()
confirmed delete
deleteNodes()
Delete nodes in the hierarchy.
__construct($a_node_id=0)
constructor
getPropertyValues()
Get property values for edit form.
setSkillNodeDescription()
Set skill node description.
create()
Create skill tree node.
readNodeObject($a_node_id)
Get node object instance.
cancelSave()
Cancel saving.
getParentGUI()
Get Parent GUI class (ilObjSCORM2004LearningModuleGUI).
setParentGUI($a_parentgui)
Set Parent GUI class.
cancelDelete()
cancel delete
saveAllTitles()
Save Titles.
editProperties()
Edit properties form.
insertTemplateReferenceClip()
Insert skill template references from clipboard.
addUsageTab($a_tabs)
Add usage tab.
update()
Update skill tree node.
insertTemplateCategoryClip()
Insert skill template category from clipboard.
addStatusInput(ilPropertyFormGUI $a_form)
Add status input.
checkPermissionBool($a_perm)
Check permission pool.
setLocator()
Set Locator Items.
cutItems()
Copy items to clipboard, then cut them from the current tree.
insertSkillCategoryClip()
Insert skill categories from clipboard.
copyItems()
Copy items to clipboard.
initForm($a_mode="edit")
Init form.
static getIconPath($a_obj_id, $a_type, $a_size="", $a_status=0)
Get icon path.
static uniqueTypesCheck($a_items)
Check for unique types.
static getStatusInfo($a_status)
Get status info.
static _lookupStatus($a_obj_id)
Lookup Status.
static saveChildsOrder($a_par_id, $a_childs_order, $a_templates=false)
Save childs order.
static insertItemsFromClip($a_type, $a_obj_id)
Insert basic skills from clipboard.
static getAllStatus()
Get all status.
static clipboardCopy($a_tree_id, $a_ids)
Copy a set of skills/skill categories into the clipboard.
static clipboardCut($a_tree_id, $a_ids)
Cut and copy a set of skills/skill categories into the clipboard.
static getAllCSkillIdsForNodeIds(array $a_node_ids)
Get all possible common skill IDs for node IDs.
static _lookupType($a_obj_id)
Lookup Type.
TableGUI class for skill usages.
This class represents a text property in a property form.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static stripSlashesArray($a_arr, $a_strip_html=true, $a_allow="")
Strip slashes from array.