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