5 include_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)
172 ilUtil::sendInfo($lng->txt(
"skmg_insert_please_choose_one_type_only"),
true);
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)
218 ilUtil::sendInfo($lng->txt(
"skmg_insert_please_choose_one_type_only"),
true);
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");
484 $ti->setRequired(
true);
485 $this->form->addItem($ti);
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)
707 $tpl->setContent(
$html);
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"),
"");
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static getAllCSkillIdsForNodeIds(array $a_node_ids)
Get all possible common skill IDs for node IDs.
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.
static clipboardCut($a_tree_id, $a_ids)
Cut and copy a set of skills/skill categories into the 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.
static _lookupObjId($a_id)
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.
Create styles array
The data for the language used.
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.
insertSkillTemplateClip()
Insert skill template from clipboard.
exportSelectedNodes()
Export seleced nodes.
__construct($a_node_id=0)
constructor
static _lookupStatus($a_obj_id)
Lookup Status.
setParentGUI($a_parentgui)
Set Parent GUI class.
static setAction($a_action)
addStatusInput(ilPropertyFormGUI $a_form)
Add status input.
insertTemplateCategoryClip()
Insert skill template category from clipboard.