25 include_once(
"./Services/Skill/classes/class.ilSkillTree.php");
36 $root_id = $this->tree->readRootId();
37 $root_node = $this->tree->getNodeData($root_id);
38 unset($root_node[
"child"]);
39 $root_node[
"id"] = $root_id.
":0";
40 $root_node[
"cskill_id"] = $root_id.
":0";
52 $this->include_drafts = $a_val;
72 $this->include_outdated = $a_val;
93 $id_parts = explode(
":", $a_id);
94 $skl_tree_id = $id_parts[0];
95 $skl_template_tree_id = $id_parts[1];
98 == $skl_template_tree_id))
100 $node_data = $this->tree->getNodeData($skl_tree_id);
101 $node_data[
"parent"] = $node_data[
"parent"].
":0";
105 $node_data = $this->tree->getNodeData($skl_template_tree_id);
106 $node_data[
"parent"] = $skl_tree_id.
":".$node_data[
"parent"];
109 unset($node_data[
"child"]);
110 unset($node_data[
"skl_tree_id"]);
111 unset($node_data[
"lft"]);
112 unset($node_data[
"rgt"]);
113 unset($node_data[
"depth"]);
115 $node_data[
"id"] = $a_id;
117 $cid_parts = explode(
":", $cid);
118 $node_data[
"skill_id"] = $cid_parts[0];
119 $node_data[
"tref_id"] = $cid_parts[1];
120 $node_data[
"cskill_id"] = $cid;
135 $a_parent_id_parts = explode(
":", $a_parent_id);
136 $a_parent_skl_tree_id = $a_parent_id_parts[0];
137 $a_parent_skl_template_tree_id = $a_parent_id_parts[1];
139 if ($a_parent_skl_template_tree_id == 0)
141 $childs = $this->tree->getChildsByTypeFilter($a_parent_skl_tree_id, array(
"scat",
"skll",
"sktr"),
"order_nr");
145 $childs = $this->tree->getChildsByTypeFilter($a_parent_skl_template_tree_id, array(
"sktp",
"sctp"),
"order_nr");
148 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
151 foreach ($childs as $k => $c)
153 if ($a_parent_skl_template_tree_id > 0)
156 $child_id = $a_parent_skl_tree_id.
":".$c[
"child"];
158 else if (!in_array($c[
"type"], array(
"sktr",
"sctr")))
161 $child_id = $c[
"child"].
":0";
166 include_once(
"./Services/Skill/classes/class.ilSkillTemplateReference.php");
169 unset($childs[$k][
"child"]);
170 unset($childs[$k][
"skl_tree_id"]);
171 unset($childs[$k][
"lft"]);
172 unset($childs[$k][
"rgt"]);
173 unset($childs[$k][
"depth"]);
174 $childs[$k][
"id"] = $child_id;
178 $cid_parts = explode(
":", $cid);
179 $childs[$k][
"skill_id"] = $cid_parts[0];
180 $childs[$k][
"tref_id"] = $cid_parts[1];
181 $childs[$k][
"cskill_id"] = $cid;
182 $childs[$k][
"parent"] = $a_parent_id;
184 $this->parent[$c[
"id"]] = $a_parent_id;
188 in_array($a_parent_id, $this->drafts))
190 $this->drafts[] = $child_id;
194 in_array($a_parent_id, $this->outdated))
196 $this->outdated[] = $child_id;
226 $id_parts = explode(
":", $a_cskill_id);
227 if ($id_parts[1] == 0)
229 $id = $id_parts[0].
":0";
233 $id = $id_parts[1].
":".$id_parts[0];
246 $id_parts = explode(
":", $a_vtree_id);
247 if ($id_parts[1] == 0)
250 $skill_id = $id_parts[0];
256 $tref_id = $id_parts[0];
257 $skill_id = $id_parts[1];
259 return $skill_id.
":".$tref_id;
273 $a_parent_id_parts = explode(
":", $a_node[
"id"]);
274 $a_parent_skl_tree_id = $a_parent_id_parts[0];
275 $a_parent_skl_template_tree_id = $a_parent_id_parts[1];
278 $title = $a_node[
"title"];
281 if ($a_node[
"type"] ==
"skrt")
283 $lng->txt(
"skmg_skills");
287 if ($a_node[
"type"] ==
"sktr")
306 $id_parts = explode(
":", $a_cskill_id);
307 if ($id_parts[1] == 0)
309 $id = $id_parts[0].
":0";
313 $id = $id_parts[1].
":".$id_parts[0];
319 if (!$a_only_basic || in_array($node[
"type"], array(
"skll",
"sktp")) ||
339 foreach ($childs as $c)
341 if (!$a_only_basic || in_array($c[
"type"], array(
"skll",
"sktp")) ||
358 return in_array($a_node_id, $this->drafts);
369 return in_array($a_node_id, $this->outdated);