ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
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 27 of file class.ilSkillTreeNodeFactory.php.

Member Function Documentation

◆ getInstance()

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

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

References $DIC, $ilDB, and ILIAS\Repository\int().

Referenced by ilCOPageHTMLExport\collectPageElements(), ILIAS\Skill\Node\SkillDeletionManager\deleteNode(), ilObjSkillTreeGUI\deleteNodes(), ILIAS\Bibliographic\Field\Table\AssignMaterialsTable\getDataRetrieval(), ilPersonalSkillsGUI\getSelfEvaluationForm(), ilSkillTreeNodeGUI\readNodeObject(), ilPersonalSkillsGUI\renderSkillHTML(), ilObjSkillTreeGUI\saveAllTemplateTitles(), and ilObjSkillTreeGUI\saveAllTitles().

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

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