ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilSkillTreeNode.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2020 ILIAS open source, Extended GPL, see docs/LICENSE */
4
11{
15 protected $db;
16
21
22 const STATUS_PUBLISH = 0;
23 const STATUS_DRAFT = 1;
24 const STATUS_OUTDATED = 2;
25 public $type;
26 public $id;
27 public $title;
29
33 public function __construct($a_id = 0)
34 {
35 global $DIC;
36
37 $this->db = $DIC->database();
38 $this->id = $a_id;
39
40 $this->skill_tree = new ilSkillTree();
41
42 if ($a_id != 0) {
43 $this->read();
44 }
45 }
46
52 public function setTitle($a_title)
53 {
54 $this->title = $a_title;
55 }
56
62 public function getTitle()
63 {
64 return $this->title;
65 }
66
72 public function setDescription($a_description)
73 {
74 $this->description = $a_description;
75 }
76
82 public function getDescription()
83 {
84 return $this->description;
85 }
86
92 public function setType($a_type)
93 {
94 $this->type = $a_type;
95 }
96
102 public function getType()
103 {
104 return $this->type;
105 }
106
112 public function setId($a_id)
113 {
114 $this->id = $a_id;
115 }
116
122 public function getId()
123 {
124 return $this->id;
125 }
126
132 public function setSelfEvaluation($a_val)
133 {
134 $this->self_eval = $a_val;
135 }
136
142 public function getSelfEvaluation()
143 {
144 return $this->self_eval;
145 }
146
152 public function setOrderNr($a_val)
153 {
154 $this->order_nr = $a_val;
155 }
156
162 public function getOrderNr()
163 {
164 return $this->order_nr;
165 }
166
172 public function setImportId($a_val)
173 {
174 $this->import_id = $a_val;
175 }
176
182 public function getImportId()
183 {
184 return $this->import_id;
185 }
186
192 protected function setCreationDate($a_val)
193 {
194 $this->creation_date = $a_val;
195 }
196
202 public function getCreationDate()
203 {
204 return $this->creation_date;
205 }
206
212 public static function getAllStatus()
213 {
214 global $DIC;
215
216 $lng = $DIC->language();
217
218 return array(
219 self::STATUS_DRAFT => $lng->txt("skmg_status_draft"),
220 self::STATUS_PUBLISH => $lng->txt("skmg_status_publish"),
221 self::STATUS_OUTDATED => $lng->txt("skmg_status_outdated")
222 );
223 }
224
231 public static function getStatusInfo($a_status)
232 {
233 global $DIC;
234
235 $lng = $DIC->language();
236
237 switch ($a_status) {
238 case self::STATUS_PUBLISH: return $lng->txt("skmg_status_publish_info");
239 case self::STATUS_DRAFT: return $lng->txt("skmg_status_draft_info");
240 case self::STATUS_OUTDATED: return $lng->txt("skmg_status_outdated_info");
241 }
242 return "";
243 }
244
248 public function read()
249 {
251
252 if (!isset($this->data_record)) {
253 $query = "SELECT * FROM skl_tree_node WHERE obj_id = " .
254 $ilDB->quote($this->id, "integer");
255 $obj_set = $ilDB->query($query);
256 $this->data_record = $ilDB->fetchAssoc($obj_set);
257 }
258 $this->setType($this->data_record["type"]);
259 $this->setTitle($this->data_record["title"]);
260 $this->setDescription($this->data_record["description"]);
261 $this->setOrderNr($this->data_record["order_nr"]);
262 $this->setSelfEvaluation($this->data_record["self_eval"]);
263 $this->setStatus($this->data_record["status"]);
264 $this->setImportId($this->data_record["import_id"]);
265 $this->setCreationDate($this->data_record["creation_date"]);
266 }
267
271 public function setDataRecord($a_record)
272 {
273 $this->data_record = $a_record;
274 }
275
282 protected static function _lookup($a_obj_id, $a_field)
283 {
284 global $DIC;
285
286 $ilDB = $DIC->database();
287
288 $query = "SELECT $a_field FROM skl_tree_node WHERE obj_id = " .
289 $ilDB->quote($a_obj_id, "integer");
290 $obj_set = $ilDB->query($query);
291 $obj_rec = $ilDB->fetchAssoc($obj_set);
292
293 return $obj_rec[$a_field];
294 }
295
302 public static function _lookupTitle($a_obj_id, $a_tref_id = 0)
303 {
304 if ($a_tref_id > 0 && ilSkillTemplateReference::_lookupTemplateId($a_tref_id) == $a_obj_id) {
305 return self::_lookup($a_tref_id, "title");
306 }
307 return self::_lookup($a_obj_id, "title");
308 }
309
316 public static function _lookupDescription($a_obj_id)
317 {
318 global $DIC;
319
320 $ilDB = $DIC->database();
321
322 return self::_lookup($a_obj_id, "description");
323 }
324
331 public static function _lookupSelfEvaluation($a_obj_id)
332 {
333 global $DIC;
334
335 $ilDB = $DIC->database();
336
337 return self::_lookup($a_obj_id, "self_eval");
338 }
339
346 public static function _lookupStatus($a_obj_id)
347 {
348 global $DIC;
349
350 $ilDB = $DIC->database();
351
352 return self::_lookup($a_obj_id, "status");
353 }
354
361 public static function _lookupType($a_obj_id)
362 {
363 global $DIC;
364
365 $ilDB = $DIC->database();
366
367 $query = "SELECT * FROM skl_tree_node WHERE obj_id = " .
368 $ilDB->quote($a_obj_id, "integer");
369 $obj_set = $ilDB->query($query);
370 $obj_rec = $ilDB->fetchAssoc($obj_set);
371
372 return $obj_rec["type"];
373 }
374
380 public function setStatus($a_val)
381 {
382 $this->status = $a_val;
383 }
384
390 public function getStatus()
391 {
392 return $this->status;
393 }
394
401 public static function _writeTitle($a_obj_id, $a_title)
402 {
403 global $DIC;
404
405 $ilDB = $DIC->database();
406
407 $query = "UPDATE skl_tree_node SET " .
408 " title = " . $ilDB->quote($a_title, "text") .
409 " WHERE obj_id = " . $ilDB->quote($a_obj_id, "integer");
410
411 $ilDB->manipulate($query);
412 }
413
420 public static function _writeDescription($a_obj_id, $a_description)
421 {
422 global $DIC;
423
424 $ilDB = $DIC->database();
425
426 $query = "UPDATE skl_tree_node SET " .
427 " description = " . $ilDB->quote($a_description, "clob") .
428 " WHERE obj_id = " . $ilDB->quote($a_obj_id, "integer");
429
430 $ilDB->manipulate($query);
431 }
432
439 public static function _writeOrderNr($a_obj_id, $a_nr)
440 {
441 global $DIC;
442
443 $ilDB = $DIC->database();
444
445 $query = "UPDATE skl_tree_node SET " .
446 " order_nr = " . $ilDB->quote($a_nr, "integer") .
447 " WHERE obj_id = " . $ilDB->quote($a_obj_id, "integer");
448 $ilDB->manipulate($query);
449 }
450
456 public function create()
457 {
459
460 // insert object data
461 $id = $ilDB->nextId("skl_tree_node");
462 $query = "INSERT INTO skl_tree_node (obj_id, title, description, type, create_date, self_eval, order_nr, status, creation_date, import_id) " .
463 "VALUES (" .
464 $ilDB->quote($id, "integer") . "," .
465 $ilDB->quote($this->getTitle(), "text") . "," .
466 $ilDB->quote($this->getDescription(), "clob") . "," .
467 $ilDB->quote($this->getType(), "text") . ", " .
468 $ilDB->now() . ", " .
469 $ilDB->quote((int) $this->getSelfEvaluation(), "integer") . ", " .
470 $ilDB->quote((int) $this->getOrderNr(), "integer") . ", " .
471 $ilDB->quote((int) $this->getStatus(), "integer") . ", " .
472 $ilDB->now() . ", " .
473 $ilDB->quote($this->getImportId(), "text") .
474 ")";
475 $ilDB->manipulate($query);
476 $this->setId($id);
477 }
478
482 public function update()
483 {
485
486 $query = "UPDATE skl_tree_node SET " .
487 " title = " . $ilDB->quote($this->getTitle(), "text") .
488 " ,description = " . $ilDB->quote($this->getDescription(), "clob") .
489 " ,self_eval = " . $ilDB->quote((int) $this->getSelfEvaluation(), "integer") .
490 " ,order_nr = " . $ilDB->quote((int) $this->getOrderNr(), "integer") .
491 " ,status = " . $ilDB->quote((int) $this->getStatus(), "integer") .
492 " ,import_id = " . $ilDB->quote($this->getImportId(), "text") .
493 " WHERE obj_id = " . $ilDB->quote($this->getId(), "integer");
494
495 $ilDB->manipulate($query);
496 }
497
501 public function delete()
502 {
504
505 $query = "DELETE FROM skl_tree_node WHERE obj_id= " .
506 $ilDB->quote($this->getId(), "integer");
507 $ilDB->manipulate($query);
508 }
509
513 public static function putInTree($a_obj, $a_parent_id = "", $a_target_node_id = "")
514 {
515 $skill_tree = new ilSkillTree();
516
517 // determine parent
518 $parent_id = ($a_parent_id != "")
519 ? $a_parent_id
520 : $skill_tree->getRootId();
521
522 // make a check, whether the type of object is allowed under
523 // the parent
524 $allowed = array(
525 "skrt" => array("skll", "scat", "sktr", "sktp", "sctp"),
526 "scat" => array("skll", "scat", "sktr"),
527 "sctp" => array("sktp", "sctp"));
528 $par_type = self::_lookupType($parent_id);
529 if (!is_array($allowed[$par_type]) ||
530 !in_array($a_obj->getType(), $allowed[$par_type])) {
531 return;
532 }
533
534 // determine target
535 if ($a_target_node_id != "") {
536 $target = $a_target_node_id;
537 } else {
538 // determine last child that serves as predecessor
539 $childs = $skill_tree->getChilds($parent_id);
540
541 if (count($childs) == 0) {
542 $target = IL_FIRST_NODE;
543 } else {
544 $target = $childs[count($childs) - 1]["obj_id"];
545 }
546 }
547
548 if ($skill_tree->isInTree($parent_id) && !$skill_tree->isInTree($a_obj->getId())) {
549 $skill_tree->insertNode($a_obj->getId(), $parent_id, $target);
550 }
551 }
552
560 public static function getTree($a_slm_obj_id)
561 {
562 $tree = new ilSkillTree();
563
564 return $tree;
565 }
566
570 public static function uniqueTypesCheck($a_items)
571 {
572 $types = array();
573 if (is_array($a_items)) {
574 foreach ($a_items as $item) {
576 $types[$type] = $type;
577 }
578 }
579
580 if (count($types) > 1) {
581 return false;
582 }
583 return true;
584 }
585
589 public static function clipboardCut($a_tree_id, $a_ids)
590 {
592 $tree = new ilSkillTree();
593
594 if (!is_array($a_ids)) {
595 return false;
596 } else {
597 // get all "top" ids, i.e. remove ids, that have a selected parent
598 foreach ($a_ids as $id) {
599 $path = $tree->getPathId($id);
600 $take = true;
601 foreach ($path as $path_id) {
602 if ($path_id != $id && in_array($path_id, $a_ids)) {
603 $take = false;
604 }
605 }
606 if ($take) {
607 $cut_ids[] = $id;
608 }
609 }
610 }
611
612 ilSkillTreeNode::clipboardCopy($a_tree_id, $cut_ids);
613
614 // remove the objects from the tree
615 // note: we are getting skills/categories which are *not* in the tree
616 // we do not delete any pages/chapters here
617 foreach ($cut_ids as $id) {
618 $curnode = $tree->getNodeData($id);
619 if ($tree->isInTree($id)) {
620 $tree->deleteTree($curnode);
621 }
622 }
623 }
624
625
629 public static function clipboardCopy($a_tree_id, $a_ids)
630 {
631 global $DIC;
632
633 $ilUser = $DIC->user();
634
636 $tree = new ilSkillTree();
637
638 // put them into the clipboard
639 $time = date("Y-m-d H:i:s", time());
640 foreach ($a_ids as $id) {
641 $curnode = "";
642 if ($tree->isInTree($id)) {
643 $curnode = $tree->getNodeData($id);
644 $subnodes = $tree->getSubTree($curnode);
645 foreach ($subnodes as $subnode) {
646 if ($subnode["child"] != $id) {
647 $ilUser->addObjectToClipboard(
648 $subnode["child"],
649 $subnode["type"],
650 $subnode["title"],
651 $subnode["parent"],
652 $time,
653 $subnode["lft"]
654 );
655 }
656 }
657 }
658 $order = ($curnode["lft"] > 0)
659 ? $curnode["lft"]
660 : (int) ($order + 1);
661 $ilUser->addObjectToClipboard(
662 $id,
665 0,
666 $time,
667 $order
668 );
669 }
670 }
671
672
676 public static function insertItemsFromClip($a_type, $a_obj_id)
677 {
678 global $DIC;
679
680 $ilUser = $DIC->user();
681
682 // @todo: move this to a service since it can be used here, too
683
684 $parent_id = $a_obj_id;
685 $target = IL_LAST_NODE;
686
687 // cut and paste
688 $skills = $ilUser->getClipboardObjects($a_type); // this will get all skills _regardless_ of level
689 $copied_nodes = array();
690 foreach ($skills as $skill) {
691 // if skill was already copied as part of tree - do not copy it again
692 if (!in_array($skill["id"], array_keys($copied_nodes))) {
694 $skill["id"],
695 $parent_id,
696 $target,
697 $skill["insert_time"],
698 $copied_nodes,
699 (ilEditClipboard::getAction() == "copy"),
700 true
701 );
702 // $target = $cid;
703 }
704 }
705
706 // if (ilEditClipboard::getAction() == "cut")
707 // {
709 // }
710
712 $a_obj_id,
713 array(),
714 in_array($a_type, array("sktp", "sctp"))
715 );
716
717 return $copied_nodes;
718 }
719
726 public static function clearClipboard()
727 {
728 global $DIC;
729
730 $ilUser = $DIC->user();
731
732 $ilUser->clipboardDeleteObjectsOfType("skll");
733 $ilUser->clipboardDeleteObjectsOfType("scat");
734 $ilUser->clipboardDeleteObjectsOfType("sktr");
735 $ilUser->clipboardDeleteObjectsOfType("sktp");
736 $ilUser->clipboardDeleteObjectsOfType("sctp");
738 }
739
740
744 public static function pasteTree(
745 $a_item_id,
746 $a_parent_id,
747 $a_target,
748 $a_insert_time,
749 &$a_copied_nodes,
750 $a_as_copy = false,
751 $a_add_suffix = false
752 ) {
753 global $DIC;
754
755 $ilUser = $DIC->user();
756 $ilLog = $DIC["ilLog"];
757 $lng = $DIC->language();
758
759 $item_type = ilSkillTreeNode::_lookupType($a_item_id);
760
761 if ($item_type == "scat") {
762 $item = new ilSkillCategory($a_item_id);
763 } elseif ($item_type == "skll") {
764 $item = new ilBasicSkill($a_item_id);
765 } elseif ($item_type == "sktr") {
766 $item = new ilSkillTemplateReference($a_item_id);
767 } elseif ($item_type == "sktp") {
768 $item = new ilBasicSkillTemplate($a_item_id);
769 } elseif ($item_type == "sctp") {
770 $item = new ilSkillTemplateCategory($a_item_id);
771 }
772
773 $ilLog->write("Getting from clipboard type " . $item_type . ", " .
774 "Item ID: " . $a_item_id);
775
776 if ($a_as_copy) {
777 $target_item = $item->copy();
778 if ($a_add_suffix) {
779 $target_item->setTitle($target_item->getTitle() . " " . $lng->txt("copy_of_suffix"));
780 $target_item->update();
781 }
782 $a_copied_nodes[$item->getId()] = $target_item->getId();
783 } else {
784 $target_item = $item;
785 }
786
787 $ilLog->write("Putting into skill tree type " . $target_item->getType() .
788 "Item ID: " . $target_item->getId() . ", Parent: " . $a_parent_id . ", " .
789 "Target: " . $a_target);
790
791 ilSkillTreeNode::putInTree($target_item, $a_parent_id, $a_target);
792
793 $childs = $ilUser->getClipboardChilds($item->getId(), $a_insert_time);
794
795 foreach ($childs as $child) {
797 $child["id"],
798 $target_item->getId(),
800 $a_insert_time,
801 $a_copied_nodes,
802 $a_as_copy
803 );
804 }
805
806 return $target_item->getId();
807 }
808
815 public static function isInTree($a_id)
816 {
817 $skill_tree = new ilSkillTree();
818 if ($skill_tree->isInTree($a_id)) {
819 return true;
820 }
821 return false;
822 }
823
830 public static function getAllSelfEvaluationNodes()
831 {
832 global $DIC;
833
834 $ilDB = $DIC->database();
835
836 $set = $ilDB->query(
837 "SELECT obj_id, title FROM skl_tree_node WHERE " .
838 " self_eval = " . $ilDB->quote(true, "integer") . " ORDER BY TITLE "
839 );
840 $nodes = array();
841 while ($rec = $ilDB->fetchAssoc($set)) {
842 $nodes[$rec["obj_id"]] = $rec["title"];
843 }
844 return $nodes;
845 }
846
853 public static function getTopTemplates()
854 {
855 $tr = new ilSkillTree();
856 $childs = $tr->getChildsByTypeFilter($tr->getRootId(), array("sktp", "sctp"));
857
858 return $childs;
859 }
860
867 public static function getSelectableSkills()
868 {
869 global $DIC;
870
871 $ilDB = $DIC->database();
872
873 $set = $ilDB->query(
874 "SELECT * FROM skl_tree_node " .
875 " WHERE self_eval = " . $ilDB->quote(1, "integer")
876 );
877
878 $sel_skills = array();
879 while ($rec = $ilDB->fetchAssoc($set)) {
880 $sel_skills[] = $rec;
881 }
882
883 return $sel_skills;
884 }
885
892 public static function saveChildsOrder($a_par_id, $a_childs_order, $a_templates = false)
893 {
894 $skill_tree = new ilSkillTree();
895
896 if ($a_par_id != $skill_tree->readRootId()) {
897 $childs = $skill_tree->getChilds($a_par_id);
898 } else {
899 if ($a_templates) {
900 $childs = $skill_tree->getChildsByTypeFilter(
901 $a_par_id,
902 array("skrt", "sktp", "sctp")
903 );
904 } else {
905 $childs = $skill_tree->getChildsByTypeFilter(
906 $a_par_id,
907 array("skrt", "skll", "scat", "sktr")
908 );
909 }
910 }
911
912 foreach ($childs as $k => $c) {
913 if (isset($a_childs_order[$c["child"]])) {
914 $childs[$k]["order_nr"] = (int) $a_childs_order[$c["child"]];
915 }
916 }
917
918 $childs = ilUtil::sortArray($childs, "order_nr", "asc", true);
919
920 $cnt = 10;
921 foreach ($childs as $c) {
922 ilSkillTreeNode::_writeOrderNr($c["child"], $cnt);
923 $cnt += 10;
924 }
925 }
926
936 public static function getIconPath($a_obj_id, $a_type, $a_size = "", $a_status = 0)
937 {
938 if ($a_status == self::STATUS_DRAFT && $a_type == "sctp") {
939 $a_type = "scat";
940 }
941 if ($a_status == self::STATUS_DRAFT && $a_type == "sktp") {
942 $a_type = "skll";
943 }
944
945 $off = ($a_status == self::STATUS_DRAFT)
946 ? "_off"
947 : "";
948
949 $a_name = "icon_" . $a_type . $a_size . $off . ".svg";
950 if ($a_type == "sktr") {
953 if ($type == "sctp") {
954 $a_name = "icon_sctr" . $a_size . $off . ".svg";
955 }
956 }
957 $vers = "vers=" . str_replace(array(".", " "), "-", ILIAS_VERSION);
958 return ilUtil::getImagePath($a_name) . "?" . $vers;
959 }
960
967 public static function findSkills($a_term)
968 {
969 global $DIC;
970
971 $ilDB = $DIC->database();
972
973 $res = array();
974 $candidates = array();
975
976 $skill_tree = new ilSkillTree();
977
978 $sql = "SELECT * " .
979 " FROM skl_tree_node" .
980 " WHERE " . $ilDB->like("title", "text", "%" . $a_term . "%");
981 $sql .= " ORDER BY title";
982 $set = $ilDB->query($sql);
983 while ($row = $ilDB->fetchAssoc($set)) {
984 if (in_array($row["type"], array("sctp", "sktp"))) {
985 // need to get "top template" first! (if it is already the top level, do not use it!)
986 $path = $skill_tree->getSkillTreePath($row["obj_id"]);
987 if ($path[1]["child"] != $row["obj_id"]) {
989 foreach ($trefs as $tref) {
990 $candidates[] = array("tref_id" => $tref, "skill_id" => $row["obj_id"], "title" => $row["title"]);
991 }
992 }
993 } elseif ($row["type"] == "sktr") {
994 // works
995 $candidates[] = array("tref_id" => $row["obj_id"], "skill_id" => ilSkillTemplateReference::_lookupTemplateId($row["obj_id"]), "title" => $row["title"]);
996 } else {
997 // works
998 $candidates[] = array("tref_id" => 0, "skill_id" => $row["obj_id"], "title" => $row["title"]);
999 }
1000 }
1001
1002 foreach ($candidates as $c) {
1003 // if we get a path array, and the array has items try to use the data
1004 $path = $skill_tree->getSkillTreePath($c["skill_id"], $c["tref_id"]);
1005 $use = false;
1006 if (is_array($path) && count($path) > 0) {
1007 $use = true;
1008 }
1009
1010 // if any inactive/outdated -> do not use the data
1011 if (is_array($path)) {
1012 foreach ($path as $p) {
1013 if ($p["status"] > 0) {
1014 $use = false;
1015 }
1016 }
1017 }
1018 if ($use) {
1019 if (!in_array($c["title"], $res)) {
1020 $res[] = $c["title"];
1021 }
1022 }
1023 }
1024
1025
1026 return $res;
1027 }
1028
1035 public static function getAllCSkillIdsForNodeIds(array $a_node_ids)
1036 {
1037 $cskill_ids = array();
1038 foreach ($a_node_ids as $id) {
1039 if (in_array(self::_lookupType($id), array("skll", "scat", "sktr"))) {
1040 $skill_id = $id;
1041 $tref_id = 0;
1042 if (ilSkillTreeNode::_lookupType($id) == "sktr") {
1044 $tref_id = $id;
1045 }
1046 $cskill_ids[] = array("skill_id" => $skill_id, "tref_id" => $tref_id);
1047 }
1048 if (in_array(ilSkillTreeNode::_lookupType($id), array("sktp", "sctp"))) {
1050 $cskill_ids[] = array("skill_id" => $id, "tref_id" => $tref_id);
1051 }
1052 }
1053 // for cats, skills and template references, get "real" usages
1054 // for skill and category templates check usage in references
1055 }
1056 return $cskill_ids;
1057 }
1058}
An exception for terminatinating execution or to throw for unit testing.
const IL_LAST_NODE
Definition: class.ilTree.php:4
const IL_FIRST_NODE
Definition: class.ilTree.php:5
static _lookupTrefIdsForTemplateId($a_tid)
Get all tref ids for a template id.
static _lookupTrefIdsForTopTemplateId($a_template_id)
Lookup tref ids for template id.
static _lookupTemplateId($a_obj_id)
Lookup template ID.
A node in the skill tree.
static isInTree($a_id)
Is id in tree?
static _writeTitle($a_obj_id, $a_title)
Write Title.
static getIconPath($a_obj_id, $a_type, $a_size="", $a_status=0)
Get icon path.
static putInTree($a_obj, $a_parent_id="", $a_target_node_id="")
Put this object into the skill tree.
static uniqueTypesCheck($a_items)
Check for unique types.
setTitle($a_title)
Set title.
getDescription()
Get description.
static getStatusInfo($a_status)
Get status info.
static _lookupStatus($a_obj_id)
Lookup Status.
static saveChildsOrder($a_par_id, $a_childs_order, $a_templates=false)
Save childs order.
static insertItemsFromClip($a_type, $a_obj_id)
Insert basic skills from clipboard.
static getAllStatus()
Get all status.
static findSkills($a_term)
Find skills.
static getTopTemplates()
Get top skill templates and template categories.
static clipboardCopy($a_tree_id, $a_ids)
Copy a set of skills/skill categories into the clipboard.
setCreationDate($a_val)
Set creation date.
setOrderNr($a_val)
Set order nr.
static _lookupSelfEvaluation($a_obj_id)
Lookup self evaluation.
static _lookupTitle($a_obj_id, $a_tref_id=0)
Lookup Title.
static _writeDescription($a_obj_id, $a_description)
Write Description.
setDescription($a_description)
Set description.
static clearClipboard()
Remove all skill items from clipboard.
read()
Read Data of Node.
static pasteTree( $a_item_id, $a_parent_id, $a_target, $a_insert_time, &$a_copied_nodes, $a_as_copy=false, $a_add_suffix=false)
Paste item (tree) from clipboard to skill tree.
getCreationDate()
Get creation date.
setType($a_type)
Set type.
static _lookup($a_obj_id, $a_field)
Lookup Title.
static getTree($a_slm_obj_id)
Get scorm module editing tree.
setId($a_id)
Set Node ID.
static clipboardCut($a_tree_id, $a_ids)
Cut and copy a set of skills/skill categories into the clipboard.
static getAllSelfEvaluationNodes()
Get all self evaluation nodes.
getOrderNr()
Get order nr.
static getSelectableSkills()
Get selectable skills.
static _writeOrderNr($a_obj_id, $a_nr)
Write Order Nr.
setDataRecord($a_record)
this method should only be called by class ilSCORM2004NodeFactory
setStatus($a_val)
Set status.
setSelfEvaluation($a_val)
Set self evaluation.
static _lookupDescription($a_obj_id)
Lookup Description.
getImportId()
Get import id.
static getAllCSkillIdsForNodeIds(array $a_node_ids)
Get all possible common skill IDs for node IDs.
static _lookupType($a_obj_id)
Lookup Type.
getSelfEvaluation()
Get self evaluation.
setImportId($a_val)
Set import id.
static sortArray( $array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
$c
Definition: cli.php:37
global $DIC
Definition: goto.php:24
$ilUser
Definition: imgupload.php:18
const ILIAS_VERSION
$query
$lng
foreach($_POST as $key=> $value) $res
global $ilDB