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;
270 $id_parts = explode(
":", $a_cskill_id);
271 if ($id_parts[1] == 0)
273 $id = $id_parts[0].
":0";
277 $id = $id_parts[1].
":".$id_parts[0];
294 $a_parent_id_parts = explode(
":", $a_node[
"id"]);
295 $a_parent_skl_tree_id = $a_parent_id_parts[0];
296 $a_parent_skl_template_tree_id = $a_parent_id_parts[1];
299 $title = $a_node[
"title"];
302 if ($a_node[
"type"] ==
"skrt")
304 $lng->txt(
"skmg_skills");
308 if ($a_node[
"type"] ==
"sktr")
327 $id_parts = explode(
":", $a_cskill_id);
328 if ($id_parts[1] == 0)
330 $id = $id_parts[0].
":0";
334 $id = $id_parts[1].
":".$id_parts[0];
340 if (!$a_only_basic || in_array($node[
"type"],
array(
"skll",
"sktp")) ||
360 foreach ($childs as $c)
362 if (!$a_only_basic || in_array($c[
"type"],
array(
"skll",
"sktp")) ||
379 return in_array($a_node_id, $this->drafts);
390 return in_array($a_node_id, $this->outdated);
isOutdated($a_node_id)
Is outdated.
getChildsOfNodeForCSkillId($a_cskill_id)
Get childs of node for cskill id.
getVTreeIdForCSkillId($a_cskill_id)
Get tree id for common skill id.
getChildsOfNode($a_parent_id)
Get childs of node.
for($col=0; $col< 50; $col++) $d
static _lookupType($a_obj_id)
Lookup Type.
getNodeTitle($a_node)
Get node content.
setIncludeDrafts($a_val)
Set include drafts.
__construct()
Constructor.
isDraft($a_node_id)
Is draft.
getRootNode()
Get root node.
static _lookupTemplateId($a_obj_id)
Lookup template ID.
Create styles array
The data for the language used.
getIncludeOutdated()
Get include outdated.
getCSkillIdForVTreeId($a_vtree_id)
Get common skill id for tree id.
getIncludeDrafts()
Get include drafts.
static _lookupStatus($a_obj_id)
Lookup Status.
getSubTreeForCSkillId($a_cskill_id, $a_only_basic=false)
Get sub tree.
__getSubTreeRec($id, &$result, $a_only_basic)
Get subtree, internal.
setIncludeOutdated($a_val)
Set include outdated.