ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilSkillDataSet.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
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 if ($a_entity == "skl_subtree") { // get subtree for top node
330 switch ($a_version) {
331 case "5.1.0":
332 case "7.0":
333 case "8.0":
334 foreach ($a_ids as $id) {
335 $skill_tree = $this->tree_repo->getTreeForNodeId($id);
336 $sub = $skill_tree->getSubTree($skill_tree->getNodeData($id));
337 foreach ($sub as $s) {
338 $set = $ilDB->query(
339 "SELECT * FROM skl_templ_ref " .
340 " WHERE skl_node_id = " . $ilDB->quote($s["child"], "integer")
341 );
342 $rec = $ilDB->fetchAssoc($set);
343
344 $top_node = ($s["child"] == $id)
345 ? 1
346 : 0;
347 $this->data[] = array(
348 "SklTreeId" => $s["skl_tree_id"],
349 "TopNode" => $top_node,
350 "Child" => $s["child"],
351 "Parent" => $s["parent"],
352 "Depth" => $s["depth"],
353 "Type" => $s["type"],
354 "Title" => $s["title"],
355 "Description" => $s["description"],
356 "SelfEval" => $s["self_eval"],
357 "OrderNr" => $s["order_nr"],
358 "Status" => $s["status"],
359 "TemplateId" => (int) ($rec["templ_id"] ?? 0)
360 );
361 }
362 }
363 break;
364 }
365 }
366
367 if ($a_entity == "skl_templ_subtree") { // get template subtree for template id
368 switch ($a_version) {
369 case "5.1.0":
370 case "7.0":
371 case "8.0":
372 foreach ($a_ids as $id) {
373 $skill_tree = $this->tree_repo->getTreeForNodeId($id);
374 $sub = $skill_tree->getSubTree($skill_tree->getNodeData($id));
375 foreach ($sub as $s) {
376 $top_node = ($s["child"] == $id)
377 ? 1
378 : 0;
379 $this->data[] = array(
380 "SklTreeId" => $s["skl_tree_id"],
381 "TopNode" => $top_node,
382 "Child" => $s["child"],
383 "Parent" => $s["parent"],
384 "Depth" => $s["depth"],
385 "Type" => $s["type"],
386 "Title" => $s["title"],
387 "Description" => $s["description"],
388 "SelfEval" => $s["self_eval"],
389 "OrderNr" => $s["order_nr"],
390 "Status" => $s["status"]
391 );
392 }
393 }
394 break;
395 }
396 }
397
398 if ($a_entity == "skl_level") {
399 switch ($a_version) {
400 case "5.1.0":
401 case "7.0":
402 case "8.0":
403 $this->getDirectDataFromQuery("SELECT id level_id, skill_id, nr, title, description" .
404 " FROM skl_level WHERE " .
405 $ilDB->in("skill_id", $a_ids, false, "integer") . " ORDER BY skill_id ASC, nr ASC");
406 break;
407 }
408 }
409
410 if ($a_entity == "skl_prof") {
411 switch ($a_version) {
412 case "5.1.0":
413 case "7.0":
414 $this->getDirectDataFromQuery("SELECT id, title, description" .
415 " FROM skl_profile WHERE " .
416 $ilDB->in("id", $a_ids, false, "integer"));
417 break;
418 case "8.0":
419 $set = $ilDB->query(
420 "SELECT id, title, description FROM skl_profile " .
421 " WHERE " . $ilDB->in("id", $a_ids, false, "integer")
422 );
423 while ($rec = $ilDB->fetchAssoc($set)) {
424 $this->data[] = [
425 "Id" => $rec["id"],
426 "Title" => $rec["title"],
427 "Description" => $rec["description"],
428 "SkillTreeId" => $this->getSkillTreeId()
429 ];
430 }
431 break;
432 }
433 }
434
435 if ($a_entity == "skl_local_prof") {
436 switch ($a_version) {
437 case "7.0":
438 foreach ($a_ids as $obj_id) {
439 $obj_ref_id = ilObject::_getAllReferences($obj_id);
440 $obj_ref_id = end($obj_ref_id);
441 $profiles = $this->skill_manager->getProfileManager()->getLocalProfilesForObject($obj_ref_id);
442 $profile_ids = [];
443 foreach ($profiles as $p) {
444 $profile_ids[] = $p->getId();
445 }
446 $set = $ilDB->query(
447 "SELECT * FROM skl_profile " .
448 " WHERE " . $ilDB->in("id", $profile_ids, false, "integer")
449 );
450 while ($rec = $ilDB->fetchAssoc($set)) {
451 $this->data[] = [
452 "Id" => $rec["id"],
453 "Title" => $rec["title"],
454 "Description" => $rec["description"],
455 "RefId" => $obj_ref_id
456 ];
457 }
458 }
459 break;
460 case "8.0":
461 foreach ($a_ids as $obj_id) {
462 $obj_ref_id = ilObject::_getAllReferences((int)$obj_id);
463 $obj_ref_id = end($obj_ref_id);
464 $profiles = $this->skill_manager->getProfileManager()->getLocalProfilesForObject($obj_ref_id);
465 $profile_ids = [];
466 foreach ($profiles as $p) {
467 $profile_ids[] = $p->getId();
468 }
469 $set = $ilDB->query(
470 "SELECT * FROM skl_profile " .
471 " WHERE " . $ilDB->in("id", $profile_ids, false, "integer")
472 );
473 while ($rec = $ilDB->fetchAssoc($set)) {
474 $this->data[] = [
475 "Id" => $rec["id"],
476 "Title" => $rec["title"],
477 "Description" => $rec["description"],
478 "RefId" => $obj_ref_id,
479 "SkillTreeId" => $this->getSkillTreeId()
480 ];
481 }
482 }
483 break;
484 }
485 }
486
487 if ($a_entity == "skl_prof_level") {
488 switch ($a_version) {
489 case "5.1.0":
490 $this->getDirectDataFromQuery("SELECT profile_id, base_skill_id, tref_id, level_id" .
491 " FROM skl_profile_level WHERE " .
492 $ilDB->in("profile_id", $a_ids, false, "integer"));
493 break;
494 case "7.0":
495 case "8.0":
496 $this->getDirectDataFromQuery("SELECT profile_id, base_skill_id, tref_id, level_id, order_nr" .
497 " FROM skl_profile_level WHERE " .
498 $ilDB->in("profile_id", $a_ids, false, "integer"));
499 break;
500 }
501 }
502 }
503
509 protected function getDependencies(
510 string $a_entity,
511 string $a_version,
512 ?array $a_rec = null,
513 ?array $a_ids = null
514 ): array {
515 $ilDB = $this->db;
516
517
518 switch ($a_entity) {
519 case "skmg":
520 $deps["skee"]["ids"] = $a_ids;
521 return $deps;
522
523 case "skee":
524 if (!isset($a_rec["Id"]) || is_null($a_rec["Id"])) {
525 return [];
526 }
527 $skill_tree = $this->skill_tree_factory->getTreeById((int) $a_rec["Id"]);
528
529 $deps = [];
530 if ($this->getMode() == self::MODE_SKILLS) {
531 // determine top nodes of main tree to be exported and all referenced template nodes
532 $sel_nodes = $this->getSelectedNodes();
533 $exp_types = array("skll", "scat", "sctr", "sktr");
534 if (!isset($sel_nodes) || count($sel_nodes) === 0) {
535 $childs = $skill_tree->getChildsByTypeFilter($skill_tree->readRootId(), $exp_types);
536 $skl_subtree_deps = [];
537 foreach ($childs as $c) {
538 $skl_subtree_deps[] = (int) $c["child"];
539 }
540 } else {
541 $skl_subtree_deps = [];
542 foreach ($sel_nodes as $n) {
543 if (in_array(ilSkillTreeNode::_lookupType($n), $exp_types)) {
544 $skl_subtree_deps[] = $n;
545 }
546 }
547 }
548
549 // determine template subtrees
550 $ref_nodes = [];
551 if (is_array($skl_subtree_deps)) {
552 foreach ($skl_subtree_deps as $id) {
553 if (ilSkillTreeNode::_lookupType($id) == "sktr") {
554 $ref_nodes[$id] = $id;
555 } else {
556 $sub = $skill_tree->getSubTree($skill_tree->getNodeData($id), true, ["sktr"]);
557 foreach ($sub as $s) {
558 $ref_nodes[$s["child"]] = $s["child"];
559 }
560 }
561 }
562 }
563
564 $set = $ilDB->query("SELECT DISTINCT(templ_id) FROM skl_templ_ref " .
565 " WHERE " . $ilDB->in("skl_node_id", $ref_nodes, false, "integer"));
566 while ($rec = $ilDB->fetchAssoc($set)) {
567 $deps["skl_templ_subtree"]["ids"][] = (int) $rec["templ_id"];
568 }
569
570 // export subtree after templates
571 $deps["skl_subtree"]["ids"] = $skl_subtree_deps;
572 } elseif ($this->getMode() == self::MODE_PROFILES) {
573 foreach ($this->getSelectedProfiles() as $p_id) {
574 $deps["skl_prof"]["ids"][] = $p_id;
575 }
576 }
577 return $deps;
578
579 case "skl_subtree":
580 case "skl_templ_subtree":
581 $deps = [];
582 if (in_array($a_rec["Type"], array("skll", "sktp"))) {
583 $deps["skl_level"]["ids"][] = $a_rec["Child"];
584 }
585 return $deps;
586
587 case "skl_prof":
588 case "skl_local_prof":
589 $deps["skl_prof_level"]["ids"][] = $a_rec["Id"] ?? null;
590 return $deps;
591 }
592
593 return [];
594 }
595
596 public function importRecord(
597 string $a_entity,
598 array $a_types,
599 array $a_rec,
600 ilImportMapping $a_mapping,
601 string $a_schema_version
602 ): void {
603 $skill_tree = $this->skill_tree_factory->getTreeById($this->getSkillTreeId());
604 $skill_tree_root_id = $skill_tree->readRootId();
605 $tree_node_manager = $this->skill_manager->getTreeNodeManager($this->getSkillTreeId());
606
607 $init_top_order_nr = $skill_tree->getMaxOrderNr($skill_tree_root_id);
608 $init_templ_top_order_nr = $skill_tree->getMaxOrderNr($skill_tree_root_id, true);
609
610 $source_inst_id = $a_mapping->getInstallId();
611 switch ($a_entity) {
612 case "skl_subtree":
613 if ((int) $a_rec["TopNode"] === 1) {
614 $parent = $skill_tree_root_id;
616 $order = (int) $a_rec["OrderNr"] + $init_top_order_nr;
617 } else {
618 $parent = (int) $a_mapping->getMapping("components/ILIAS/Skill", "skl_tree", $a_rec["Parent"]);
619 $status = (int) $a_rec["Status"];
620 $order = (int) $a_rec["OrderNr"];
621 }
622 switch ($a_rec["Type"]) {
623 case "scat":
624 $scat = new ilSkillCategory();
625 $scat->setTitle($a_rec["Title"]);
626 $scat->setDescription($a_rec["Description"] ?? "");
627 $scat->setImportId("il_" . $source_inst_id . "_scat_" . $a_rec["Child"]);
628 $scat->setSelfEvaluation((bool) $a_rec["SelfEval"]);
629 $scat->setOrderNr($order);
630 $scat->setStatus($status);
631 $scat->create();
632 $tree_node_manager->putIntoTree($scat, $parent);
633 $a_mapping->addMapping("components/ILIAS/Skill", "skl_tree", $a_rec["Child"], (string) $scat->getId());
634 break;
635
636 case "skll":
637 $skll = new ilBasicSkill();
638 $skll->setTitle($a_rec["Title"]);
639 $skll->setDescription($a_rec["Description"] ?? "");
640 $skll->setImportId("il_" . $source_inst_id . "_skll_" . $a_rec["Child"]);
641 $skll->setSelfEvaluation((bool) $a_rec["SelfEval"]);
642 $skll->setOrderNr($order);
643 $skll->setStatus($status);
644 $skll->create();
645 $tree_node_manager->putIntoTree($skll, $parent);
646 $a_mapping->addMapping("components/ILIAS/Skill", "skl_tree", $a_rec["Child"], (string) $skll->getId());
647 break;
648
649 case "sktr":
650 $template_id = (int) $a_mapping->getMapping("components/ILIAS/Skill", "skl_tree", $a_rec["TemplateId"]);
651 // only create template references, if referenced template is found (template trees are imported first)
652 if ($template_id > 0) {
653 $sktr = new ilSkillTemplateReference();
654 $sktr->setTitle($a_rec["Title"]);
655 $sktr->setDescription($a_rec["Description"] ?? "");
656 $sktr->setImportId("il_" . $source_inst_id . "_sktr_" . $a_rec["Child"]);
657 $sktr->setSelfEvaluation((bool) $a_rec["SelfEval"]);
658 $sktr->setOrderNr($order);
659 $sktr->setSkillTemplateId($template_id);
660 $sktr->setStatus($status);
661 $sktr->create();
662 $tree_node_manager->putIntoTree($sktr, $parent);
663 $a_mapping->addMapping("components/ILIAS/Skill", "skl_tree", $a_rec["Child"], (string) $sktr->getId());
664 }
665 break;
666 }
667 break;
668
669 case "skl_templ_subtree":
670 if ((int) $a_rec["TopNode"] === 1) {
671 $parent = $skill_tree_root_id;
672 $order = (int) $a_rec["OrderNr"] + $init_templ_top_order_nr;
673 } else {
674 $parent = (int) $a_mapping->getMapping("components/ILIAS/Skill", "skl_tree", $a_rec["Parent"]);
675 $order = (int) $a_rec["OrderNr"];
676 }
677 switch ($a_rec["Type"]) {
678 case "sctp":
679 $sctp = new ilSkillTemplateCategory();
680 $sctp->setTitle($a_rec["Title"]);
681 $sctp->setDescription($a_rec["Description"] ?? "");
682 $sctp->setImportId("il_" . $source_inst_id . "_sctp_" . $a_rec["Child"]);
683 $sctp->setOrderNr($order);
684 $sctp->create();
685 $tree_node_manager->putIntoTree($sctp, $parent);
686 $a_mapping->addMapping("components/ILIAS/Skill", "skl_tree", $a_rec["Child"], (string) $sctp->getId());
687 break;
688
689 case "sktp":
690 $sktp = new ilBasicSkillTemplate();
691 $sktp->setTitle($a_rec["Title"]);
692 $sktp->setDescription($a_rec["Description"] ?? "");
693 $sktp->setImportId("il_" . $source_inst_id . "_sktp_" . $a_rec["Child"]);
694 $sktp->setOrderNr($order);
695 $sktp->create();
696 $tree_node_manager->putIntoTree($sktp, $parent);
697 $a_mapping->addMapping("components/ILIAS/Skill", "skl_tree", $a_rec["Child"], (string) $sktp->getId());
698 break;
699 }
700 break;
701
702 case "skl_level":
703 $skill_id = (int) $a_mapping->getMapping("components/ILIAS/Skill", "skl_tree", $a_rec["SkillId"]);
704 $type = ilSkillTreeNode::_lookupType($skill_id);
705 if (in_array($type, array("skll", "sktp"))) {
706 if ($type == "skll") {
707 $skill = new ilBasicSkill($skill_id);
708 } else {
709 $skill = new ilBasicSkillTemplate($skill_id);
710 }
711 $skill->addLevel($a_rec["Title"], $a_rec["Description"], "il_" . $source_inst_id . "_sklv_" . $a_rec["LevelId"]);
712 $skill->update();
713 }
714 break;
715
716 case "skl_prof":
717 $profile = $this->skill_factory->profile()->profile(
718 0,
719 $a_rec["Title"],
720 $a_rec["Description"] ?? "",
721 $this->getSkillTreeId()
722 );
723 $new_profile = $this->skill_manager->getProfileManager()->createProfile($profile);
724
725 $a_mapping->addMapping("components/ILIAS/Skill", "skl_prof", $a_rec["Id"], (string) $new_profile->getId());
726 break;
727
728 case "skl_local_prof":
729 $profile = $this->skill_factory->profile()->profile(
730 0,
731 $a_rec["Title"],
732 $a_rec["Description"] ?? "",
733 $this->getSkillTreeId(),
734 "",
735 (int) $a_rec["RefId"]
736 );
737 $new_profile = $this->skill_manager->getProfileManager()->createProfile($profile);
738
739 $a_mapping->addMapping("components/ILIAS/Skill", "skl_local_prof", $a_rec["Id"], (string) $new_profile->getId());
740 break;
741
742 case "skl_prof_level":
743 $profile_id = (int) $a_mapping->getMapping("components/ILIAS/Skill", "skl_prof", $a_rec["ProfileId"])
744 ? (int) $a_mapping->getMapping("components/ILIAS/Skill", "skl_prof", $a_rec["ProfileId"])
745 : (int) $a_mapping->getMapping("components/ILIAS/Skill", "skl_local_prof", $a_rec["ProfileId"]);
746 if ($profile_id > 0) {
747 $level_id_data = ilBasicSkill::getLevelIdForImportId((int) $this->getCurrentInstallationId(), (int) $a_rec["LevelId"]);
748 $skill_data = ilBasicSkill::getCommonSkillIdForImportId((int) $this->getCurrentInstallationId(), (int) $a_rec["BaseSkillId"], (int) $a_rec["TrefId"]);
749 $level_id = $tref_id = $base_skill = 0;
750 foreach ($level_id_data as $l) {
751 reset($skill_data);
752 foreach ($skill_data as $s) {
753 // echo "<br>=".ilBasicSkill::lookupLevelSkillId($l["level_id"])."=".$s["skill_id"]."=";
754
755 if ($level_id == 0 && ilBasicSkill::lookupLevelSkillId($l["level_id"]) == $s["skill_id"]) {
756 $level_id = $l["level_id"];
757 $base_skill = $s["skill_id"];
758 $tref_id = $s["tref_id"];
759 }
760 }
761 }
762 if ($level_id > 0) {
763 $level = $this->skill_factory->profile()->profileLevel(
764 $profile_id,
765 $base_skill,
766 $tref_id,
767 $level_id,
768 (int) $a_rec["OrderNr"]
769 );
770 $this->skill_manager->getProfileManager()->addSkillLevel($level);
771 }
772 }
773 break;
774 }
775 }
776}
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
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)
A dataset contains in data in a common structure that can be shared and transformed for different pur...
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
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
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)
static _lookupType(int $a_obj_id)
$c
Definition: deliver.php:25
Interface ilSkillTreeRepository.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26