ILIAS  release_8 Revision v8.24
class.ilSkillDataSet.php
Go to the documentation of this file.
1<?php
2
24
39{
40 public const MODE_SKILLS = "";
41 public const MODE_PROFILES = "prof";
43
44 protected int $skill_tree_id = 0;
45 protected int $skill_tree_root_id = 0;
46 protected int $init_top_order_nr = 0;
47 protected int $init_templ_top_order_nr = 0;
48
52 protected array $selected_nodes = [];
53
57 protected array $selected_profiles = [];
58 protected string $mode = "";
59
63
64 public function __construct()
65 {
66 global $DIC;
67
68 $this->db = $DIC->database();
70
71 $this->skill_manager = $DIC->skills()->internal()->manager();
72 $this->skill_tree_factory = $DIC->skills()->internal()->factory()->tree();
73 $this->skill_factory = $DIC->skills()->internal()->factory();
74 $this->tree_repo = $DIC->skills()->internal()->repo()->getTreeRepo();
75 }
76
77 public function setMode(string $a_val): void
78 {
79 $this->mode = $a_val;
80 }
81
82 public function getMode(): string
83 {
84 return $this->mode;
85 }
86
90 public function setSelectedNodes(array $a_val): void
91 {
92 $this->selected_nodes = $a_val;
93 }
94
98 public function getSelectedNodes(): array
99 {
101 }
102
106 public function setSelectedProfiles(array $a_val): void
107 {
108 $this->selected_profiles = $a_val;
109 }
110
114 public function getSelectedProfiles(): array
115 {
117 }
118
119 public function setSkillTreeId(int $skill_tree_id): void
120 {
121 $this->skill_tree_id = $skill_tree_id;
122 }
123
124 public function getSkillTreeId(): int
125 {
127 }
128
132 public function getSupportedVersions(): array
133 {
134 return array("5.1.0", "7.0", "8.0");
135 }
136
137 protected function getXmlNamespace(string $a_entity, string $a_schema_version): string
138 {
139 return "http://www.ilias.de/xml/Services/Skill/" . $a_entity;
140 }
141
145 protected function getTypes(string $a_entity, string $a_version): array
146 {
147 if ($a_entity == "skmg") {
148 switch ($a_version) {
149 case "5.1.0":
150 case "7.0":
151 return array(
152 "Mode" => "text"
153 );
154 case "8.0":
155 return array(
156 "Id" => "integer"
157 );
158 }
159 }
160 if ($a_entity == "skee") {
161 switch ($a_version) {
162 case "8.0":
163 return array(
164 "Id" => "integer",
165 "Mode" => "text"
166 );
167 }
168 }
169 if ($a_entity == "skl_subtree") {
170 switch ($a_version) {
171 case "5.1.0":
172 case "7.0":
173 case "8.0":
174 return array(
175 "SklTreeId" => "integer",
176 "TopNode" => "integer",
177 "Child" => "integer",
178 "Parent" => "integer",
179 "Depth" => "integer",
180 "Type" => "text",
181 "Title" => "text",
182 "Description" => "text",
183 "SelfEval" => "integer",
184 "OrderNr" => "integer",
185 "Status" => "integer",
186 "TemplateId" => "integer"
187 );
188 }
189 }
190 if ($a_entity == "skl_templ_subtree") {
191 switch ($a_version) {
192 case "5.1.0":
193 case "7.0":
194 case "8.0":
195 return array(
196 "SklTreeId" => "integer",
197 "TopNode" => "integer",
198 "Child" => "integer",
199 "Parent" => "integer",
200 "Depth" => "integer",
201 "Type" => "text",
202 "Title" => "text",
203 "Description" => "text",
204 "SelfEval" => "integer",
205 "OrderNr" => "integer",
206 "Status" => "integer"
207 );
208 }
209 }
210 if ($a_entity == "skl_level") {
211 switch ($a_version) {
212 case "5.1.0":
213 case "7.0":
214 case "8.0":
215 return array(
216 "LevelId" => "integer",
217 "SkillId" => "integer",
218 "Nr" => "integer",
219 "Title" => "text",
220 "Description" => "text"
221 );
222 }
223 }
224 if ($a_entity == "skl_prof") {
225 switch ($a_version) {
226 case "5.1.0":
227 case "7.0":
228 return array(
229 "Id" => "integer",
230 "Title" => "text",
231 "Description" => "text"
232 );
233 case "8.0":
234 return array(
235 "Id" => "integer",
236 "Title" => "text",
237 "Description" => "text",
238 "SkillTreeId" => "integer"
239 );
240 }
241 }
242 if ($a_entity == "skl_local_prof") {
243 switch ($a_version) {
244 case "7.0":
245 return array(
246 "Id" => "integer",
247 "Title" => "text",
248 "Description" => "text",
249 "RefId" => "integer"
250 );
251 case "8.0":
252 return array(
253 "Id" => "integer",
254 "Title" => "text",
255 "Description" => "text",
256 "RefId" => "integer",
257 "SkillTreeId" => "integer"
258 );
259 }
260 }
261 if ($a_entity == "skl_prof_level") {
262 switch ($a_version) {
263 case "5.1.0":
264 return array(
265 "ProfileId" => "integer",
266 "BaseSkillId" => "integer",
267 "TrefId" => "integer",
268 "LevelId" => "integer"
269 );
270 case "7.0":
271 case "8.0":
272 return array(
273 "ProfileId" => "integer",
274 "BaseSkillId" => "integer",
275 "TrefId" => "integer",
276 "LevelId" => "integer",
277 "OrderNr" => "integer"
278 );
279 }
280 }
281 return [];
282 }
283
284 public function readData(string $a_entity, string $a_version, array $a_ids): void
285 {
287
288 $this->data = [];
289
290 if (!is_array($a_ids)) {
291 $a_ids = array($a_ids);
292 }
293 if ($a_entity == "skmg") {
294 switch ($a_version) {
295 case "5.1.0":
296 case "7.0":
297 if ($this->getMode() == self::MODE_SKILLS) {
298 $this->data[] = array("Mode" => "Skills");
299 } elseif ($this->getMode() == self::MODE_PROFILES) {
300 $this->data[] = array("Mode" => "Profiles");
301 }
302 break;
303 case "8.0":
304 $this->data[] = [
305 "Id" => $this->getSkillTreeId()
306 ];
307 break;
308 }
309 }
310 if ($a_entity == "skee") { // dummy node
311 switch ($a_version) {
312 case "8.0":
313 foreach ($a_ids as $id) {
314 if ($this->getMode() == self::MODE_SKILLS) {
315 $this->data[] = array(
316 "Id" => $id,
317 "Mode" => "Skills"
318 );
319 } elseif ($this->getMode() == self::MODE_PROFILES) {
320 $this->data[] = array(
321 "Id" => $id,
322 "Mode" => "Profiles"
323 );
324 }
325 }
326 break;
327
328 }
329 }
330 if ($a_entity == "skl_subtree") { // get subtree for top node
331 switch ($a_version) {
332 case "5.1.0":
333 case "7.0":
334 case "8.0":
335 foreach ($a_ids as $id) {
336 $skill_tree = $this->tree_repo->getTreeForNodeId($id);
337 $sub = $skill_tree->getSubTree($skill_tree->getNodeData($id));
338 foreach ($sub as $s) {
339 $set = $ilDB->query(
340 "SELECT * FROM skl_templ_ref " .
341 " WHERE skl_node_id = " . $ilDB->quote($s["child"], "integer")
342 );
343 $rec = $ilDB->fetchAssoc($set);
344
345 $top_node = ($s["child"] == $id)
346 ? 1
347 : 0;
348 $this->data[] = array(
349 "SklTreeId" => $s["skl_tree_id"],
350 "TopNode" => $top_node,
351 "Child" => $s["child"],
352 "Parent" => $s["parent"],
353 "Depth" => $s["depth"],
354 "Type" => $s["type"],
355 "Title" => $s["title"],
356 "Description" => $s["description"],
357 "SelfEval" => $s["self_eval"],
358 "OrderNr" => $s["order_nr"],
359 "Status" => $s["status"],
360 "TemplateId" => (int) ($rec["templ_id"] ?? 0)
361 );
362 }
363 }
364 break;
365
366 }
367 }
368
369 if ($a_entity == "skl_templ_subtree") { // get template subtree for template id
370 switch ($a_version) {
371 case "5.1.0":
372 case "7.0":
373 case "8.0":
374 foreach ($a_ids as $id) {
375 $skill_tree = $this->tree_repo->getTreeForNodeId($id);
376 $sub = $skill_tree->getSubTree($skill_tree->getNodeData($id));
377 foreach ($sub as $s) {
378 $top_node = ($s["child"] == $id)
379 ? 1
380 : 0;
381 $this->data[] = array(
382 "SklTreeId" => $s["skl_tree_id"],
383 "TopNode" => $top_node,
384 "Child" => $s["child"],
385 "Parent" => $s["parent"],
386 "Depth" => $s["depth"],
387 "Type" => $s["type"],
388 "Title" => $s["title"],
389 "Description" => $s["description"],
390 "SelfEval" => $s["self_eval"],
391 "OrderNr" => $s["order_nr"],
392 "Status" => $s["status"]
393 );
394 }
395 }
396 break;
397
398 }
399 }
400
401 if ($a_entity == "skl_level") {
402 switch ($a_version) {
403 case "5.1.0":
404 case "7.0":
405 case "8.0":
406 $this->getDirectDataFromQuery("SELECT id level_id, skill_id, nr, title, description" .
407 " FROM skl_level WHERE " .
408 $ilDB->in("skill_id", $a_ids, false, "integer") . " ORDER BY skill_id ASC, nr ASC");
409 break;
410
411 }
412 }
413
414 if ($a_entity == "skl_prof") {
415 switch ($a_version) {
416 case "5.1.0":
417 case "7.0":
418 $this->getDirectDataFromQuery("SELECT id, title, description" .
419 " FROM skl_profile WHERE " .
420 $ilDB->in("id", $a_ids, false, "integer"));
421 break;
422 case "8.0":
423 $set = $ilDB->query(
424 "SELECT id, title, description FROM skl_profile " .
425 " WHERE " . $ilDB->in("id", $a_ids, false, "integer")
426 );
427 while ($rec = $ilDB->fetchAssoc($set)) {
428 $this->data[] = [
429 "Id" => $rec["id"],
430 "Title" => $rec["title"],
431 "Description" => $rec["description"],
432 "SkillTreeId" => $this->getSkillTreeId()
433 ];
434 }
435 break;
436
437 }
438 }
439
440 if ($a_entity == "skl_local_prof") {
441 switch ($a_version) {
442 case "7.0":
443 foreach ($a_ids as $obj_id) {
444 $obj_ref_id = ilObject::_getAllReferences($obj_id);
445 $obj_ref_id = end($obj_ref_id);
446 $profiles = $this->skill_manager->getProfileManager()->getLocalProfilesForObject($obj_ref_id);
447 $profile_ids = [];
448 foreach ($profiles as $p) {
449 $profile_ids[] = $p["id"];
450 }
451 $set = $ilDB->query(
452 "SELECT * FROM skl_profile " .
453 " WHERE " . $ilDB->in("id", $profile_ids, false, "integer")
454 );
455 while ($rec = $ilDB->fetchAssoc($set)) {
456 $this->data[] = [
457 "Id" => $rec["id"],
458 "Title" => $rec["title"],
459 "Description" => $rec["description"],
460 "RefId" => $obj_ref_id
461 ];
462 }
463 }
464 break;
465 case "8.0":
466 foreach ($a_ids as $obj_id) {
467 $obj_ref_id = ilObject::_getAllReferences((int)$obj_id);
468 $obj_ref_id = end($obj_ref_id);
469 $profiles = $this->skill_manager->getProfileManager()->getLocalProfilesForObject($obj_ref_id);
470 $profile_ids = [];
471 foreach ($profiles as $p) {
472 $profile_ids[] = $p["id"];
473 }
474 $set = $ilDB->query(
475 "SELECT * FROM skl_profile " .
476 " WHERE " . $ilDB->in("id", $profile_ids, false, "integer")
477 );
478 while ($rec = $ilDB->fetchAssoc($set)) {
479 $this->data[] = [
480 "Id" => $rec["id"],
481 "Title" => $rec["title"],
482 "Description" => $rec["description"],
483 "RefId" => $obj_ref_id,
484 "SkillTreeId" => $this->getSkillTreeId()
485 ];
486 }
487 }
488 break;
489
490 }
491 }
492
493 if ($a_entity == "skl_prof_level") {
494 switch ($a_version) {
495 case "5.1.0":
496 $this->getDirectDataFromQuery("SELECT profile_id, base_skill_id, tref_id, level_id" .
497 " FROM skl_profile_level WHERE " .
498 $ilDB->in("profile_id", $a_ids, false, "integer"));
499 break;
500 case "7.0":
501 case "8.0":
502 $this->getDirectDataFromQuery("SELECT profile_id, base_skill_id, tref_id, level_id, order_nr" .
503 " FROM skl_profile_level WHERE " .
504 $ilDB->in("profile_id", $a_ids, false, "integer"));
505 break;
506 }
507 }
508 }
509
515 protected function getDependencies(
516 string $a_entity,
517 string $a_version,
518 ?array $a_rec = null,
519 ?array $a_ids = null
520 ): array {
521 $ilDB = $this->db;
522
523
524 switch ($a_entity) {
525 case "skmg":
526 $deps["skee"]["ids"] = $a_ids;
527 return $deps;
528
529 case "skee":
530 if (!isset($a_rec["Id"]) || is_null($a_rec["Id"])) {
531 return [];
532 }
533 $skill_tree = $this->skill_tree_factory->getTreeById((int) $a_rec["Id"]);
534
535 $deps = [];
536 if ($this->getMode() == self::MODE_SKILLS) {
537 // determine top nodes of main tree to be exported and all referenced template nodes
538 $sel_nodes = $this->getSelectedNodes();
539 $exp_types = array("skll", "scat", "sctr", "sktr");
540 if (!isset($sel_nodes) || count($sel_nodes) === 0) {
541 $childs = $skill_tree->getChildsByTypeFilter($skill_tree->readRootId(), $exp_types);
542 $skl_subtree_deps = [];
543 foreach ($childs as $c) {
544 $skl_subtree_deps[] = (int) $c["child"];
545 }
546 } else {
547 $skl_subtree_deps = [];
548 foreach ($sel_nodes as $n) {
549 if (in_array(ilSkillTreeNode::_lookupType($n), $exp_types)) {
550 $skl_subtree_deps[] = $n;
551 }
552 }
553 }
554
555 // determine template subtrees
556 $ref_nodes = [];
557 if (is_array($skl_subtree_deps)) {
558 foreach ($skl_subtree_deps as $id) {
559 if (ilSkillTreeNode::_lookupType($id) == "sktr") {
560 $ref_nodes[$id] = $id;
561 } else {
562 $sub = $skill_tree->getSubTree($skill_tree->getNodeData($id), true, ["sktr"]);
563 foreach ($sub as $s) {
564 $ref_nodes[$s["child"]] = $s["child"];
565 }
566 }
567 }
568 }
569
570 $set = $ilDB->query("SELECT DISTINCT(templ_id) FROM skl_templ_ref " .
571 " WHERE " . $ilDB->in("skl_node_id", $ref_nodes, false, "integer"));
572 while ($rec = $ilDB->fetchAssoc($set)) {
573 $deps["skl_templ_subtree"]["ids"][] = (int) $rec["templ_id"];
574 }
575
576 // export subtree after templates
577 $deps["skl_subtree"]["ids"] = $skl_subtree_deps;
578 } elseif ($this->getMode() == self::MODE_PROFILES) {
579 foreach ($this->getSelectedProfiles() as $p_id) {
580 $deps["skl_prof"]["ids"][] = $p_id;
581 }
582 }
583 return $deps;
584
585 case "skl_subtree":
586 case "skl_templ_subtree":
587 $deps = [];
588 if (in_array($a_rec["Type"], array("skll", "sktp"))) {
589 $deps["skl_level"]["ids"][] = $a_rec["Child"];
590 }
591 return $deps;
592
593 case "skl_prof":
594 case "skl_local_prof":
595 $deps["skl_prof_level"]["ids"][] = $a_rec["Id"] ?? null;
596 return $deps;
597 }
598
599 return [];
600 }
601
602 public function importRecord(
603 string $a_entity,
604 array $a_types,
605 array $a_rec,
606 ilImportMapping $a_mapping,
607 string $a_schema_version
608 ): void {
609 $skill_tree = $this->skill_tree_factory->getTreeById($this->getSkillTreeId());
610 $skill_tree_root_id = $skill_tree->readRootId();
611 $tree_node_manager = $this->skill_manager->getTreeNodeManager($this->getSkillTreeId());
612
613 $init_top_order_nr = $skill_tree->getMaxOrderNr($skill_tree_root_id);
614 $init_templ_top_order_nr = $skill_tree->getMaxOrderNr($skill_tree_root_id, true);
615
616 $source_inst_id = $a_mapping->getInstallId();
617 switch ($a_entity) {
618 case "skl_subtree":
619 if ($a_rec["TopNode"] == 1) {
620 $parent = $skill_tree_root_id;
622 $order = (int) $a_rec["OrderNr"] + $init_top_order_nr;
623 } else {
624 $parent = (int) $a_mapping->getMapping("Services/Skill", "skl_tree", $a_rec["Parent"]);
625 $status = (int) $a_rec["Status"];
626 $order = (int) $a_rec["OrderNr"];
627 }
628 switch ($a_rec["Type"]) {
629 case "scat":
630 $scat = new ilSkillCategory();
631 $scat->setTitle($a_rec["Title"]);
632 $scat->setDescription($a_rec["Description"] ?? "");
633 $scat->setImportId("il_" . $source_inst_id . "_scat_" . $a_rec["Child"]);
634 $scat->setSelfEvaluation((bool) $a_rec["SelfEval"]);
635 $scat->setOrderNr($order);
636 $scat->setStatus($status);
637 $scat->create();
638 $tree_node_manager->putIntoTree($scat, $parent);
639 $a_mapping->addMapping("Services/Skill", "skl_tree", $a_rec["Child"], $scat->getId());
640 break;
641
642 case "skll":
643 $skll = new ilBasicSkill();
644 $skll->setTitle($a_rec["Title"]);
645 $skll->setDescription($a_rec["Description"] ?? "");
646 $skll->setImportId("il_" . $source_inst_id . "_skll_" . $a_rec["Child"]);
647 $skll->setSelfEvaluation((bool) $a_rec["SelfEval"]);
648 $skll->setOrderNr($order);
649 $skll->setStatus($status);
650 $skll->create();
651 $tree_node_manager->putIntoTree($skll, $parent);
652 $a_mapping->addMapping("Services/Skill", "skl_tree", $a_rec["Child"], $skll->getId());
653 break;
654
655 case "sktr":
656 $template_id = (int) $a_mapping->getMapping("Services/Skill", "skl_tree", $a_rec["TemplateId"]);
657 // only create template references, if referenced template is found (template trees are imported first)
658 if ($template_id > 0) {
659 $sktr = new ilSkillTemplateReference();
660 $sktr->setTitle($a_rec["Title"]);
661 $sktr->setDescription($a_rec["Description"] ?? "");
662 $sktr->setImportId("il_" . $source_inst_id . "_sktr_" . $a_rec["Child"]);
663 $sktr->setSelfEvaluation((bool) $a_rec["SelfEval"]);
664 $sktr->setOrderNr($order);
665 $sktr->setSkillTemplateId($template_id);
666 $sktr->setStatus($status);
667 $sktr->create();
668 $tree_node_manager->putIntoTree($sktr, $parent);
669 $a_mapping->addMapping("Services/Skill", "skl_tree", $a_rec["Child"], $sktr->getId());
670 }
671 break;
672
673 }
674 break;
675
676 case "skl_templ_subtree":
677 if ($a_rec["TopNode"] == 1) {
678 $parent = $skill_tree_root_id;
679 $order = (int) $a_rec["OrderNr"] + $init_templ_top_order_nr;
680 } else {
681 $parent = (int) $a_mapping->getMapping("Services/Skill", "skl_tree", $a_rec["Parent"]);
682 $order = (int) $a_rec["OrderNr"];
683 }
684 switch ($a_rec["Type"]) {
685 case "sctp":
686 $sctp = new ilSkillTemplateCategory();
687 $sctp->setTitle($a_rec["Title"]);
688 $sctp->setDescription($a_rec["Description"] ?? "");
689 $sctp->setImportId("il_" . $source_inst_id . "_sctp_" . $a_rec["Child"]);
690 $sctp->setOrderNr($order);
691 $sctp->create();
692 $tree_node_manager->putIntoTree($sctp, $parent);
693 $a_mapping->addMapping("Services/Skill", "skl_tree", $a_rec["Child"], $sctp->getId());
694 break;
695
696 case "sktp":
697 $sktp = new ilBasicSkillTemplate();
698 $sktp->setTitle($a_rec["Title"]);
699 $sktp->setDescription($a_rec["Description"] ?? "");
700 $sktp->setImportId("il_" . $source_inst_id . "_sktp_" . $a_rec["Child"]);
701 $sktp->setOrderNr($order);
702 $sktp->create();
703 $tree_node_manager->putIntoTree($sktp, $parent);
704 $a_mapping->addMapping("Services/Skill", "skl_tree", $a_rec["Child"], $sktp->getId());
705 break;
706 }
707 break;
708
709 case "skl_level":
710 $skill_id = (int) $a_mapping->getMapping("Services/Skill", "skl_tree", $a_rec["SkillId"]);
712 if (in_array($type, array("skll", "sktp"))) {
713 if ($type == "skll") {
714 $skill = new ilBasicSkill($skill_id);
715 } else {
716 $skill = new ilBasicSkillTemplate($skill_id);
717 }
718 $skill->addLevel($a_rec["Title"], $a_rec["Description"], "il_" . $source_inst_id . "_sklv_" . $a_rec["LevelId"]);
719 $skill->update();
720 }
721 break;
722
723 case "skl_prof":
724 $profile = $this->skill_factory->profile(
725 0,
726 $a_rec["Title"],
727 $a_rec["Description"] ?? "",
728 $this->getSkillTreeId()
729 );
730 $new_profile = $this->skill_manager->getProfileManager()->createProfile($profile);
731
732 $a_mapping->addMapping("Services/Skill", "skl_prof", $a_rec["Id"], $new_profile->getId());
733 break;
734
735 case "skl_local_prof":
736 $profile = $this->skill_factory->profile(
737 0,
738 $a_rec["Title"],
739 $a_rec["Description"] ?? "",
740 $this->getSkillTreeId(),
741 "",
742 $a_rec["RefId"]
743 );
744 $new_profile = $this->skill_manager->getProfileManager()->createProfile($profile);
745
746 $a_mapping->addMapping("Services/Skill", "skl_local_prof", $a_rec["Id"], $new_profile->getId());
747 break;
748
749 case "skl_prof_level":
750 $profile_id = (int) $a_mapping->getMapping("Services/Skill", "skl_prof", $a_rec["ProfileId"])
751 ? (int) $a_mapping->getMapping("Services/Skill", "skl_prof", $a_rec["ProfileId"])
752 : (int) $a_mapping->getMapping("Services/Skill", "skl_local_prof", $a_rec["ProfileId"]);
753 if ($profile_id > 0) {
754 $prof = $this->skill_manager->getProfileManager()->getById($profile_id);
755 $level_id_data = ilBasicSkill::getLevelIdForImportId($this->getCurrentInstallationId(), $a_rec["LevelId"]);
756 $skill_data = ilBasicSkill::getCommonSkillIdForImportId($this->getCurrentInstallationId(), $a_rec["BaseSkillId"], $a_rec["TrefId"]);
757 $level_id = $tref_id = $base_skill = 0;
758 foreach ($level_id_data as $l) {
759 reset($skill_data);
760 foreach ($skill_data as $s) {
761 // echo "<br>=".ilBasicSkill::lookupLevelSkillId($l["level_id"])."=".$s["skill_id"]."=";
762
763 if ($level_id == 0 && ilBasicSkill::lookupLevelSkillId($l["level_id"]) == $s["skill_id"]) {
764 $level_id = $l["level_id"];
765 $base_skill = $s["skill_id"];
766 $tref_id = $s["tref_id"];
767 }
768 }
769 }
770 if ($level_id > 0) {
771 $prof->addSkillLevel($base_skill, $tref_id, $level_id, $a_rec["OrderNr"]);
772 }
773 $this->skill_manager->getProfileManager()->updateProfile($prof);
774 }
775 break;
776 }
777 }
778}
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static lookupLevelSkillId(int $a_id)
static getCommonSkillIdForImportId(int $a_source_inst_id, int $a_skill_import_id, int $a_tref_import_id=0)
static getLevelIdForImportId(int $a_source_inst_id, int $a_level_import_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getDirectDataFromQuery(string $a_query, bool $a_convert_to_leading_upper=true, bool $a_set=true)
Get data from query.This is a standard procedure, all db field names are directly mapped to abstract ...
ilDBInterface $db
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
addMapping(string $a_comp, string $a_entity, string $a_old_id, string $a_new_id)
getMapping(string $a_comp, string $a_entity, string $a_old_id)
static _getAllReferences(int $id)
get all reference ids for object ID
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Skill Data set class.
SkillInternalFactoryService $skill_factory
setSelectedProfiles(array $a_val)
getTypes(string $a_entity, string $a_version)
Get field types for entity.
ilSkillTreeRepository $tree_repo
SkillInternalManagerService $skill_manager
setMode(string $a_val)
getXmlNamespace(string $a_entity, string $a_schema_version)
readData(string $a_entity, string $a_version, array $a_ids)
Read data from DB.
SkillTreeFactory $skill_tree_factory
getDependencies(string $a_entity, string $a_version, ?array $a_rec=null, ?array $a_ids=null)
importRecord(string $a_entity, array $a_types, array $a_rec, ilImportMapping $a_mapping, string $a_schema_version)
Needs to be overwritten for import use case.
setSkillTreeId(int $skill_tree_id)
setSelectedNodes(array $a_val)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupType(int $a_obj_id)
$c
Definition: cli.php:38
global $DIC
Definition: feed.php:28
Interface ilSkillTreeRepository.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$type