ILIAS  release_8 Revision v8.24
ilSkillTemplateReference Class Reference

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

+ Inheritance diagram for ilSkillTemplateReference:
+ Collaboration diagram for ilSkillTemplateReference:

Public Member Functions

 __construct (int $a_id=0)
 
 setSkillTemplateId (int $a_val)
 
 getSkillTemplateId ()
 
 read ()
 Read Data of Node. More...
 
 create ()
 Create Node. More...
 
 update ()
 Update Node. More...
 
 delete ()
 
 copy ()
 
- Public Member Functions inherited from ilSkillTreeNode
 __construct (int $a_id=0)
 
 setTitle (string $a_title)
 
 getTitle ()
 
 setDescription (string $a_description)
 
 getDescription ()
 
 setType (string $a_type)
 
 getType ()
 
 setId (int $a_id)
 
 getId ()
 
 setSelfEvaluation (bool $a_val)
 
 getSelfEvaluation ()
 
 setOrderNr (int $a_val)
 
 getOrderNr ()
 
 setImportId (string $a_val)
 
 getImportId ()
 
 getCreationDate ()
 
 read ()
 Read Data of Node. More...
 
 setDataRecord (array $a_record)
 this method should only be called by class ilSCORM2004NodeFactory More...
 
 setStatus (int $a_val)
 
 getStatus ()
 
 create ()
 Create Node. More...
 
 update ()
 Update Node. More...
 
 delete ()
 

Static Public Member Functions

static _lookupTemplateId (int $a_obj_id)
 
static _lookupTrefIdsForTopTemplateId (int $a_template_id)
 
static _lookupTrefIdsForTemplateId (int $a_tid)
 
- Static Public Member Functions inherited from ilSkillTreeNode
static getAllStatus ()
 Get all status as array, key is value, value is lang text. More...
 
static getStatusInfo (int $a_status)
 
static _lookupTitle (int $a_obj_id, int $a_tref_id=0)
 
static _lookupDescription (int $a_obj_id)
 
static _lookupSelfEvaluation (int $a_obj_id)
 
static _lookupStatus (int $a_obj_id)
 
static _lookupType (int $a_obj_id)
 
static _writeTitle (int $a_obj_id, string $a_title)
 
static _writeDescription (int $a_obj_id, string $a_description)
 
static _writeOrderNr (int $a_obj_id, int $a_nr)
 
static uniqueTypesCheck (array $a_items)
 Check for unique types. More...
 
static getAllSelfEvaluationNodes ()
 
static getSelectableSkills ()
 
static getIconPath (int $a_obj_id, string $a_type, string $a_size="", int $a_status=0)
 
static getAllCSkillIdsForNodeIds (array $a_node_ids)
 Get all possible common skill IDs for node IDs. More...
 

Protected Attributes

ilDBInterface $db
 
int $skill_template_id = 0
 
- Protected Attributes inherited from ilSkillTreeNode
ilDBInterface $db
 
ILIAS Skill Service SkillService $skill_service
 
string $type = ""
 
int $id = 0
 
string $title = ""
 
string $description = ""
 
bool $self_eval = false
 
int $order_nr = 0
 
string $import_id = ""
 
string $creation_date = ""
 
int $status = 0
 
array $data_record = []
 

Additional Inherited Members

- Data Fields inherited from ilSkillTreeNode
const STATUS_PUBLISH = 0
 
const STATUS_DRAFT = 1
 
const STATUS_OUTDATED = 2
 
- Protected Member Functions inherited from ilSkillTreeNode
 setCreationDate (string $a_val)
 
- Static Protected Member Functions inherited from ilSkillTreeNode
static _lookup (int $a_obj_id, string $a_field)
 

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 Skill Template Reference

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.ilSkillTemplateReference.php.

Constructor & Destructor Documentation

◆ __construct()

ilSkillTemplateReference::__construct ( int  $a_id = 0)

Reimplemented from ilSkillTreeNode.

Definition at line 30 of file class.ilSkillTemplateReference.php.

31 {
32 global $DIC;
33
34 $this->db = $DIC->database();
36 $this->setType("sktr");
37 }
setType(string $a_type)
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), and ilSkillTreeNode\setType().

+ Here is the call graph for this function:

Member Function Documentation

◆ _lookupTemplateId()

static ilSkillTemplateReference::_lookupTemplateId ( int  $a_obj_id)
static

◆ _lookupTrefIdsForTemplateId()

static ilSkillTemplateReference::_lookupTrefIdsForTemplateId ( int  $a_tid)
static
Parameters
int$a_tidtemplate node id (node id in template tree)
Returns
array|int[]

Definition at line 156 of file class.ilSkillTemplateReference.php.

156 : array
157 {
158 global $DIC;
159
160 $tree = $DIC->skills()->internal()->repo()->getTreeRepo()->getTreeForNodeId($a_tid);
161 $top_template_id = $tree->getTopParentNodeId($a_tid);
162 return self::_lookupTrefIdsForTopTemplateId($top_template_id);
163 }
static _lookupTrefIdsForTopTemplateId(int $a_template_id)

References $DIC, and _lookupTrefIdsForTopTemplateId().

Referenced by ilObjSkillManagementGUI\deleteNodes(), ilObjSkillTreeGUI\deleteNodes(), ilSkillTreeNode\getAllCSkillIdsForNodeIds(), and ilSkillUsage\getAllUsagesOfTemplate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _lookupTrefIdsForTopTemplateId()

static ilSkillTemplateReference::_lookupTrefIdsForTopTemplateId ( int  $a_template_id)
static
Parameters
int$a_template_id(top) template node id
Returns
array|int[]

Definition at line 134 of file class.ilSkillTemplateReference.php.

134 : array
135 {
136 global $DIC;
137
138 $ilDB = $DIC->database();
139
140 $set = $ilDB->query(
141 "SELECT * FROM skl_templ_ref " .
142 " WHERE templ_id = " . $ilDB->quote($a_template_id, "integer")
143 );
144 $trefs = [];
145 while ($rec = $ilDB->fetchAssoc($set)) {
146 $trefs[] = (int) $rec["skl_node_id"];
147 }
148 return $trefs;
149 }

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

Referenced by _lookupTrefIdsForTemplateId(), ilBasicSkillTemplate\delete(), ilSkillTemplateCategory\delete(), and ilObjSkillTreeGUI\deleteNodes().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ copy()

ilSkillTemplateReference::copy ( )

Definition at line 102 of file class.ilSkillTemplateReference.php.

103 {
104 $sktr = new ilSkillTemplateReference();
105 $sktr->setTitle($this->getTitle());
106 $sktr->setDescription($this->getDescription());
107 $sktr->setType($this->getType());
108 $sktr->setSkillTemplateId($this->getSkillTemplateId());
109 $sktr->setSelfEvaluation($this->getSelfEvaluation());
110 $sktr->setOrderNr($this->getOrderNr());
111 $sktr->create();
112
113 return $sktr;
114 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References ilSkillTreeNode\getDescription(), ilSkillTreeNode\getOrderNr(), ilSkillTreeNode\getSelfEvaluation(), getSkillTemplateId(), ilSkillTreeNode\getTitle(), and ilSkillTreeNode\getType().

+ Here is the call graph for this function:

◆ create()

ilSkillTemplateReference::create ( )

Create Node.

Reimplemented from ilSkillTreeNode.

Definition at line 64 of file class.ilSkillTemplateReference.php.

64 : void
65 {
67
68 parent::create();
69
70 $ilDB->manipulate("INSERT INTO skl_templ_ref " .
71 "(skl_node_id, templ_id) VALUES (" .
72 $ilDB->quote($this->getId(), "integer") . "," .
73 $ilDB->quote($this->getSkillTemplateId(), "integer") .
74 ")");
75 }

References $db, and $ilDB.

◆ delete()

ilSkillTemplateReference::delete ( )

Reimplemented from ilSkillTreeNode.

Definition at line 90 of file class.ilSkillTemplateReference.php.

90 : void
91 {
93
94 $ilDB->manipulate(
95 "DELETE FROM skl_templ_ref WHERE "
96 . " skl_node_id = " . $ilDB->quote($this->getId(), "integer")
97 );
98
99 parent::delete();
100 }

References $db, and $ilDB.

◆ getSkillTemplateId()

ilSkillTemplateReference::getSkillTemplateId ( )

Definition at line 44 of file class.ilSkillTemplateReference.php.

References $skill_template_id.

Referenced by copy().

+ Here is the caller graph for this function:

◆ read()

ilSkillTemplateReference::read ( )

Read Data of Node.

Reimplemented from ilSkillTreeNode.

Definition at line 49 of file class.ilSkillTemplateReference.php.

49 : void
50 {
52
53 parent::read();
54
55 $set = $ilDB->query(
56 "SELECT * FROM skl_templ_ref " .
57 " WHERE skl_node_id = " . $ilDB->quote($this->getId(), "integer")
58 );
59 if ($rec = $ilDB->fetchAssoc($set)) {
60 $this->setSkillTemplateId((int) $rec["templ_id"]);
61 }
62 }

References $db, $ilDB, and setSkillTemplateId().

+ Here is the call graph for this function:

◆ setSkillTemplateId()

ilSkillTemplateReference::setSkillTemplateId ( int  $a_val)

Definition at line 39 of file class.ilSkillTemplateReference.php.

39 : void
40 {
41 $this->skill_template_id = $a_val;
42 }

Referenced by read().

+ Here is the caller graph for this function:

◆ update()

ilSkillTemplateReference::update ( )

Update Node.

Reimplemented from ilSkillTreeNode.

Definition at line 77 of file class.ilSkillTemplateReference.php.

77 : void
78 {
80
81 parent::update();
82
83 $ilDB->manipulate(
84 "UPDATE skl_templ_ref SET " .
85 " templ_id = " . $ilDB->quote($this->getSkillTemplateId(), "integer") .
86 " WHERE skl_node_id = " . $ilDB->quote($this->getId(), "integer")
87 );
88 }

References $db, and $ilDB.

Field Documentation

◆ $db

ilDBInterface ilSkillTemplateReference::$db
protected

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

Referenced by create(), delete(), read(), and update().

◆ $skill_template_id

int ilSkillTemplateReference::$skill_template_id = 0
protected

Definition at line 28 of file class.ilSkillTemplateReference.php.

Referenced by getSkillTemplateId().


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