ILIAS  release_8 Revision v8.24
ilSkillTreeNodeFactory Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Collaboration diagram for ilSkillTreeNodeFactory:

Static Public Member Functions

static getInstance (int $a_id=0)
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Factory for skill tree nodes

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e

Definition at line 25 of file class.ilSkillTreeNodeFactory.php.

Member Function Documentation

◆ getInstance()

static ilSkillTreeNodeFactory::getInstance ( int  $a_id = 0)
static

Definition at line 27 of file class.ilSkillTreeNodeFactory.php.

28 {
29 global $DIC;
30
31 $ilDB = $DIC->database();
32
33 $query = "SELECT * FROM skl_tree_node WHERE obj_id = " .
34 $ilDB->quote($a_id, "integer");
35 $obj_set = $ilDB->query($query);
36 $obj_rec = $ilDB->fetchAssoc($obj_set);
37 $obj = null;
38
39 switch ($obj_rec["type"]) {
40 case "skll":
41 $obj = new ilBasicSkill();
42 $obj->setId($obj_rec["obj_id"]);
43 $obj->setDataRecord($obj_rec);
44 $obj->read();
45 break;
46
47 case "scat":
48 $obj = new ilSkillCategory();
49 $obj->setId($obj_rec["obj_id"]);
50 $obj->setDataRecord($obj_rec);
51 $obj->read();
52 break;
53
54 case "sktp":
55 $obj = new ilBasicSkillTemplate();
56 $obj->setId($obj_rec["obj_id"]);
57 $obj->setDataRecord($obj_rec);
58 $obj->read();
59 break;
60
61 case "sctp":
62 $obj = new ilSkillTemplateCategory();
63 $obj->setId($obj_rec["obj_id"]);
64 $obj->setDataRecord($obj_rec);
65 $obj->read();
66 break;
67
68 case "skrt":
69 $obj = new ilSkillRoot();
70 $obj->setId($obj_rec["obj_id"]);
71 $obj->setDataRecord($obj_rec);
72 $obj->read();
73 break;
74
75 case "sktr":
76 $obj = new ilSkillTemplateReference();
77 $obj->setId($obj_rec["obj_id"]);
78 $obj->setDataRecord($obj_rec);
79 $obj->read();
80 break;
81 }
82 return $obj;
83 }
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...
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...
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...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: feed.php:28
$query

References $DIC, $ilDB, and $query.

Referenced by ilObjSkillManagementGUI\confirmedDelete(), ilObjSkillTreeGUI\confirmedDelete(), ilObjSkillTreeGUI\confirmedDeleteTrees(), ilBasicSkillTemplate\delete(), ilSkillTemplateCategory\delete(), ilObjSkillManagementGUI\deleteNodes(), ilObjSkillTreeGUI\deleteNodes(), ilSelfEvaluationSimpleTableGUI\getLevels(), ilSkillAssignMaterialsTableGUI\getLevels(), ilSkillTreeNodeGUI\readNodeObject(), ilObjSkillManagementGUI\saveAllTemplateTitles(), ilObjSkillTreeGUI\saveAllTemplateTitles(), ilObjSkillManagementGUI\saveAllTitles(), and ilObjSkillTreeGUI\saveAllTitles().

+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: