5include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
63 $this->ctrl =
$DIC->ctrl();
64 $this->lng =
$DIC->language();
65 $this->locator =
$DIC[
"ilLocator"];
66 $this->tpl =
$DIC[
"tpl"];
67 $this->
user = $DIC->user();
68 $ilAccess =
$DIC->access();
70 $this->node_object =
null;
71 $this->access = $ilAccess;
72 $this->ref_id = (int)
$_GET[
"ref_id"];
88 if (!is_object($this->node_object)) {
91 if ($this->use_checked) {
95 include_once(
"./Services/Skill/classes/class.ilSkillUsage.php");
97 $usages = $u->getAllUsagesInfoOfSubtrees($cskill_ids);
98 if (count($usages) > 0) {
101 $this->in_use =
false;
114 return $this->access->checkAccess($a_perm,
"", $this->ref_id);
125 $this->parentgui = $a_parentgui;
135 return $this->parentgui;
143 include_once(
"./Services/Skill/classes/class.ilSkillTreeNodeFactory.php");
155 $ilCtrl->redirect($this,
"showOrganization");
165 $ilCtrl->setParameter($this,
"backcmd",
$_GET[
"backcmd"]);
176 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
178 if (!is_array(
$_POST[
"id"]) || count(
$_POST[
"id"]) == 0) {
184 foreach ($items as $k => $item) {
189 foreach ($todel as $k) {
200 include_once(
"./Modules/LearningModule/classes/class.ilEditClipboard.php");
206 (
int)
$_GET[
"obj_id"],
222 if (!is_array(
$_POST[
"id"]) || count(
$_POST[
"id"]) == 0) {
226 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
230 foreach ($items as $k => $item) {
235 foreach ($todel as $k) {
245 include_once(
"./Modules/LearningModule/classes/class.ilEditClipboard.php");
275 (
int)
$_GET[
"obj_id"],
292 $ilLocator->addRepositoryItems(
$_GET[
"ref_id"]);
295 if (
$_GET[
"obj_id"] > 0) {
296 include_once(
"./Services/Skill/classes/class.ilSkillTree.php");
298 $path = $tree->getPathFull(
$_GET[
"obj_id"]);
299 for (
$i = 1;
$i < count($path);
$i++) {
300 switch ($path[
$i][
"type"]) {
303 "ilskillcategorygui",
310 "ilskillmanagementgui",
329 "ilskillmanagementgui",
342 $ilCtrl->setParameter($this,
"obj_id",
$_GET[
"obj_id"]);
354 if (is_object($this->node_object)) {
355 include_once(
"./Services/Skill/classes/class.ilSkillTree.php");
357 $path = $this->node_object->skill_tree->getSkillTreePath(
358 $this->node_object->getId(),
362 foreach ($path as $p) {
363 if (in_array($p[
"type"], array(
"scat",
"skll",
"sktr"))) {
364 $desc .= $sep . $p[
"title"];
369 $tpl->setDescription($desc);
380 $tpl->setContent($this->form->getHTML());
396 $radg->addOption($op);
415 $tpl->setContent($this->form->getHTML());
425 $values[
"title"] = $this->node_object->getTitle();
426 $values[
"description"] = $this->node_object->getDescription();
427 $values[
"order_nr"] = $this->node_object->getOrderNr();
428 $values[
"self_eval"] = $this->node_object->getSelfEvaluation();
429 $values[
"status"] = $this->node_object->getStatus();
431 $this->form->setValuesByArray($values);
449 if ($this->form->checkInput()) {
451 ilUtil::sendSuccess(
$lng->txt(
"msg_obj_modified"),
true);
453 (
int)
$_GET[
"obj_id"],
455 in_array($this->getType(), array(
"sktp",
"sctp"))
459 $this->form->setValuesByPost();
460 $tpl->setContent($this->form->getHtml());
488 if ($this->form->checkInput()) {
490 ilUtil::sendSuccess(
$lng->txt(
"msg_obj_modified"),
true);
493 $this->form->setValuesByPost();
494 $tpl->setContent($this->form->getHtml());
505 $ilCtrl->redirect($this,
"editProperties");
518 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
523 $ti->setMaxLength(200);
525 $ti->setRequired(
true);
526 $this->form->addItem($ti);
531 $this->form->addItem($ta);
535 $ni->setInfo(
$lng->txt(
"skmg_order_nr_info"));
536 $ni->setMaxLength(6);
538 $ni->setRequired(
true);
539 if ($a_mode ==
"create") {
540 include_once(
"./Services/Skill/classes/class.ilSkillTree.php");
542 $max = $tree->getMaxOrderNr((
int)
$_GET[
"obj_id"]);
543 $ni->setValue($max + 10);
545 $this->form->addItem($ni);
549 if ($a_mode ==
"create") {
550 $this->form->addCommandButton(
"save",
$lng->txt(
"save"));
551 $this->form->addCommandButton(
"cancelSave",
$lng->txt(
"cancel"));
552 $this->form->setTitle(
$lng->txt(
"skmg_create_" . $this->getType()));
554 $this->form->addCommandButton(
"update",
$lng->txt(
"save"));
555 $this->form->setTitle(
$lng->txt(
"skmg_edit_" . $this->getType()));
559 $ilCtrl->setParameter($this,
"obj_id",
$_GET[
"obj_id"]);
560 $this->form->setFormAction(
$ilCtrl->getFormAction($this));
584 if (
$_GET[
"tmpmode"]) {
592 $ilCtrl->setParameterByClass(
"ilskillrootgui",
"obj_id", (
int)
$_GET[
"obj_id"]);
594 $ilCtrl->redirectByClass(
"ilskillrootgui",
"listTemplates");
596 $ilCtrl->redirectByClass(
"ilskillrootgui",
"listSkills");
601 $ilCtrl->setParameterByClass(
"ilskilltemplatecategorygui",
"obj_id", (
int)
$_GET[
"obj_id"]);
602 $ilCtrl->redirectByClass(
"ilskilltemplatecategorygui",
"listItems");
606 $ilCtrl->setParameterByClass(
"ilskillcategorygui",
"obj_id", (
int)
$_GET[
"obj_id"]);
607 $ilCtrl->redirectByClass(
"ilskillcategorygui",
"listItems");
625 (
int)
$_GET[
"obj_id"],
627 (
int) $_GET[
"tmpmode"]
629 ilUtil::sendSuccess(
$lng->txt(
"msg_obj_modified"),
true);
641 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
654 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
667 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
680 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
693 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
705 $obj_id = (is_object($this->node_object))
706 ? $this->node_object->getId()
735 $lng->txt(
"skmg_usage"),
736 $ilCtrl->getLinkTarget($this,
"showUsage")
748 $this->setTabs(
"usage");
750 include_once(
"./Services/Skill/classes/class.ilSkillUsage.php");
752 $base_skill_id = ($this->base_skill_id > 0)
753 ? $this->base_skill_id
754 : $this->node_object->getId();
755 $usages = $usage_info->getAllUsagesInfoOfSubtree($base_skill_id .
":" . $this->tref_id);
758 include_once(
"./Services/Skill/classes/class.ilSkillUsageTableGUI.php");
759 foreach ($usages as $k => $usage) {
761 $html .=
$tab->getHTML() .
"<br/><br/>";
764 $tpl->setContent($html);
774 if (!is_array(
$_POST[
"id"]) || count(
$_POST[
"id"]) == 0) {
778 include_once(
"./Services/Export/classes/class.ilExport.php");
780 $conf = $exp->getConfig(
"Services/Skill");
781 $conf->setSelectedNodes(
$_POST[
"id"]);
784 $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 area property in a property form.
This class represents a text property in a property form.
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.