ILIAS  release_8 Revision v8.24
ilSkillTreeNode 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 ilSkillTreeNode:
+ Collaboration diagram for ilSkillTreeNode:

Public Member Functions

 __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 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...
 

Data Fields

const STATUS_PUBLISH = 0
 
const STATUS_DRAFT = 1
 
const STATUS_OUTDATED = 2
 

Protected Member Functions

 setCreationDate (string $a_val)
 

Static Protected Member Functions

static _lookup (int $a_obj_id, string $a_field)
 

Protected Attributes

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 = []
 

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 A node in the skill tree

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

Constructor & Destructor Documentation

◆ __construct()

ilSkillTreeNode::__construct ( int  $a_id = 0)

Reimplemented in ilBasicSkillTemplate, ilSkillCategory, ilSkillRoot, ilSkillTemplateCategory, and ilSkillTemplateReference.

Definition at line 57 of file class.ilSkillTreeNode.php.

58 {
59 global $DIC;
60
61 $this->db = $DIC->database();
62 $this->id = $a_id;
63
64 if ($a_id != 0) {
65 $this->read();
66 }
67 $this->skill_service = $DIC->skills();
68 }
read()
Read Data of Node.
global $DIC
Definition: feed.php:28

References $DIC, and read().

+ Here is the call graph for this function:

Member Function Documentation

◆ _lookup()

static ilSkillTreeNode::_lookup ( int  $a_obj_id,
string  $a_field 
)
staticprotected

Definition at line 214 of file class.ilSkillTreeNode.php.

214 : ?string
215 {
216 global $DIC;
217
218 $ilDB = $DIC->database();
219
220 $query = "SELECT $a_field FROM skl_tree_node WHERE obj_id = " .
221 $ilDB->quote($a_obj_id, "integer");
222 $obj_set = $ilDB->query($query);
223 $obj_rec = $ilDB->fetchAssoc($obj_set);
224
225 return isset($obj_rec[$a_field]) ? (string) $obj_rec[$a_field] : null;
226 }
$query

References $DIC, $ilDB, and $query.

Referenced by _lookupDescription(), _lookupSelfEvaluation(), _lookupStatus(), and _lookupTitle().

+ Here is the caller graph for this function:

◆ _lookupDescription()

static ilSkillTreeNode::_lookupDescription ( int  $a_obj_id)
static

Definition at line 236 of file class.ilSkillTreeNode.php.

236 : string
237 {
238 global $DIC;
239
240 $ilDB = $DIC->database();
241
242 return (string) self::_lookup($a_obj_id, "description");
243 }
static _lookup(int $a_obj_id, string $a_field)

References $DIC, $ilDB, and _lookup().

Referenced by ilPersonalSkillsGUI\getSkillCategoryDescription(), and ilSkillTemplateReferenceGUI\initForm().

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

◆ _lookupSelfEvaluation()

static ilSkillTreeNode::_lookupSelfEvaluation ( int  $a_obj_id)
static

Definition at line 245 of file class.ilSkillTreeNode.php.

245 : bool
246 {
247 global $DIC;
248
249 $ilDB = $DIC->database();
250
251 return (bool) self::_lookup($a_obj_id, "self_eval");
252 }

References $DIC, $ilDB, and _lookup().

Referenced by ilPersonalSkillExplorerGUI\buildSelectableTree(), ilSkillTemplateTreeExplorerGUI\getNodeContent(), ilSkillTreeExplorerGUI\getNodeContent(), and ilPersonalSkillExplorerGUI\isNodeClickable().

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

◆ _lookupStatus()

static ilSkillTreeNode::_lookupStatus ( int  $a_obj_id)
static

Definition at line 254 of file class.ilSkillTreeNode.php.

254 : int
255 {
256 global $DIC;
257
258 $ilDB = $DIC->database();
259
260 return (int) self::_lookup($a_obj_id, "status");
261 }

References $DIC, $ilDB, and _lookup().

Referenced by ilPersonalSkillExplorerGUI\buildSelectableTree(), ilSkillCatTableGUI\fillRow(), ilSkillTemplateTreeExplorerGUI\getChildsOfNode(), ilVirtualSkillTree\getChildsOfNode(), and ilSkillTreeNodeGUI\setTitleIcon().

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

◆ _lookupTitle()

static ilSkillTreeNode::_lookupTitle ( int  $a_obj_id,
int  $a_tref_id = 0 
)
static

Definition at line 228 of file class.ilSkillTreeNode.php.

228 : string
229 {
230 if ($a_tref_id > 0 && ilSkillTemplateReference::_lookupTemplateId($a_tref_id) == $a_obj_id) {
231 return self::_lookup($a_tref_id, "title");
232 }
233 return (string) self::_lookup($a_obj_id, "title");
234 }

References _lookup(), and ilSkillTemplateReference\_lookupTemplateId().

Referenced by ilSkillUsageTableGUI\__construct(), ilSurveySkillThresholdsTableGUI\__construct(), ilPersonalSkillsGUI\assignMaterials(), ILIAS\Skill\Tree\SkillTreeNodeManager\clipboardCopy(), ilTestSkillLevelThresholdsTableGUI\completeCompetenceTitles(), ilSkillProfileGUI\confirmLevelAssignmentRemoval(), ilContSkillAdminGUI\confirmRemoveSelectedSkill(), ilPersonalSkillsGUI\confirmSkillRemove(), ilSurveySkillAssignmentTableGUI\fillRow(), ilSurveySkillTableGUI\fillRow(), ilContSkillMemberTableGUI\fillRow(), ilSurveySkill\getAllAssignedSkillsAsOptions(), ilSkillLearningHistoryProvider\getEntries(), ilTestSkillLevelThresholdImportFails\getFailedImportsMessage(), ilSkillTemplateTreeExplorerGUI\getNodeContent(), ilSkillTreeExplorerGUI\getNodeContent(), ilContSkillCollector\getProfileSkills(), ilPersonalSkill\getSelectedUserSkills(), ilContSkillCollector\getSingleSkills(), ilSurveySkillTableGUI\getSkills(), ilContSkillAdminGUI\initCompetenceAssignmentForm(), ilAssQuestionSkillAssignment\loadAdditionalSkillData(), ilPersonalSkillsGUI\selfEvaluation(), ilSkillNotifications\sendMail(), ilSkillTemplateReferenceGUI\setTabs(), ilSkillCategoryGUI\setTabs(), ilSkillTemplateCategoryGUI\setTabs(), ilBasicSkillGUI\setTabs(), and ilBasicSkillTemplateGUI\setTabs().

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

◆ _lookupType()

static ilSkillTreeNode::_lookupType ( int  $a_obj_id)
static

◆ _writeDescription()

static ilSkillTreeNode::_writeDescription ( int  $a_obj_id,
string  $a_description 
)
static

Definition at line 300 of file class.ilSkillTreeNode.php.

300 : void
301 {
302 global $DIC;
303
304 $ilDB = $DIC->database();
305
306 $query = "UPDATE skl_tree_node SET " .
307 " description = " . $ilDB->quote($a_description, "clob") .
308 " WHERE obj_id = " . $ilDB->quote($a_obj_id, "integer");
309
310 $ilDB->manipulate($query);
311 }

References $DIC, $ilDB, and $query.

◆ _writeOrderNr()

static ilSkillTreeNode::_writeOrderNr ( int  $a_obj_id,
int  $a_nr 
)
static

Definition at line 313 of file class.ilSkillTreeNode.php.

313 : void
314 {
315 global $DIC;
316
317 $ilDB = $DIC->database();
318
319 $query = "UPDATE skl_tree_node SET " .
320 " order_nr = " . $ilDB->quote($a_nr, "integer") .
321 " WHERE obj_id = " . $ilDB->quote($a_obj_id, "integer");
322 $ilDB->manipulate($query);
323 }

References $DIC, $ilDB, and $query.

Referenced by ILIAS\Skill\Tree\SkillTreeNodeManager\saveChildsOrder().

+ Here is the caller graph for this function:

◆ _writeTitle()

static ilSkillTreeNode::_writeTitle ( int  $a_obj_id,
string  $a_title 
)
static

Definition at line 287 of file class.ilSkillTreeNode.php.

287 : void
288 {
289 global $DIC;
290
291 $ilDB = $DIC->database();
292
293 $query = "UPDATE skl_tree_node SET " .
294 " title = " . $ilDB->quote($a_title, "text") .
295 " WHERE obj_id = " . $ilDB->quote($a_obj_id, "integer");
296
297 $ilDB->manipulate($query);
298 }

References $DIC, $ilDB, and $query.

Referenced by ilObjSkillManagementGUI\saveAllTemplateTitles(), ilObjSkillTreeGUI\saveAllTemplateTitles(), ilObjSkillManagementGUI\saveAllTitles(), and ilObjSkillTreeGUI\saveAllTitles().

+ Here is the caller graph for this function:

◆ create()

ilSkillTreeNode::create ( )

Create Node.

Reimplemented in ilBasicSkill, and ilSkillTemplateReference.

Definition at line 328 of file class.ilSkillTreeNode.php.

328 : void
329 {
331
332 // insert object data
333 $id = $ilDB->nextId("skl_tree_node");
334 $query = "INSERT INTO skl_tree_node (obj_id, title, description, type, create_date, self_eval, order_nr, status, creation_date, import_id) " .
335 "VALUES (" .
336 $ilDB->quote($id, "integer") . "," .
337 $ilDB->quote($this->getTitle(), "text") . "," .
338 $ilDB->quote($this->getDescription(), "clob") . "," .
339 $ilDB->quote($this->getType(), "text") . ", " .
340 $ilDB->now() . ", " .
341 $ilDB->quote((int) $this->getSelfEvaluation(), "integer") . ", " .
342 $ilDB->quote($this->getOrderNr(), "integer") . ", " .
343 $ilDB->quote($this->getStatus(), "integer") . ", " .
344 $ilDB->now() . ", " .
345 $ilDB->quote($this->getImportId(), "text") .
346 ")";
347 $ilDB->manipulate($query);
348 $this->setId($id);
349 }

References $db, $id, $ilDB, $query, getDescription(), getImportId(), getOrderNr(), getSelfEvaluation(), getStatus(), getTitle(), getType(), and setId().

+ Here is the call graph for this function:

◆ delete()

ilSkillTreeNode::delete ( )

Reimplemented in ilBasicSkill, ilBasicSkillTemplate, ilSkillCategory, ilSkillRoot, ilSkillTemplateCategory, and ilSkillTemplateReference.

Definition at line 370 of file class.ilSkillTreeNode.php.

370 : void
371 {
373
374 $query = "DELETE FROM skl_tree_node WHERE obj_id= " .
375 $ilDB->quote($this->getId(), "integer");
376 $ilDB->manipulate($query);
377 }

References $db, $ilDB, $query, and getId().

+ Here is the call graph for this function:

◆ getAllCSkillIdsForNodeIds()

static ilSkillTreeNode::getAllCSkillIdsForNodeIds ( array  $a_node_ids)
static

Get all possible common skill IDs for node IDs.

Definition at line 471 of file class.ilSkillTreeNode.php.

471 : array
472 {
473 $cskill_ids = [];
474 foreach ($a_node_ids as $id) {
475 if (in_array(self::_lookupType($id), array("skll", "scat", "sktr"))) {
476 $skill_id = $id;
477 $tref_id = 0;
478 if (ilSkillTreeNode::_lookupType($id) == "sktr") {
480 $tref_id = $id;
481 }
482 $cskill_ids[] = array("skill_id" => $skill_id, "tref_id" => $tref_id);
483 }
484 if (in_array(ilSkillTreeNode::_lookupType($id), array("sktp", "sctp"))) {
486 $cskill_ids[] = array("skill_id" => $id, "tref_id" => $tref_id);
487 }
488 }
489 // for cats, skills and template references, get "real" usages
490 // for skill and category templates check usage in references
491 }
492 return $cskill_ids;
493 }
static _lookupType(int $a_obj_id)

References $id, ilSkillTemplateReference\_lookupTemplateId(), ilSkillTemplateReference\_lookupTrefIdsForTemplateId(), and _lookupType().

Referenced by ilSkillTreeNodeGUI\isInUse().

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

◆ getAllSelfEvaluationNodes()

static ilSkillTreeNode::getAllSelfEvaluationNodes ( )
static
Returns
array<int, string>

Definition at line 399 of file class.ilSkillTreeNode.php.

399 : array
400 {
401 global $DIC;
402
403 $ilDB = $DIC->database();
404
405 $set = $ilDB->query(
406 "SELECT obj_id, title FROM skl_tree_node WHERE " .
407 " self_eval = " . $ilDB->quote(true, "integer") . " ORDER BY TITLE "
408 );
409 $nodes = [];
410 while ($rec = $ilDB->fetchAssoc($set)) {
411 $rec["obj_id"] = (int) $rec["obj_id"];
412 $nodes[$rec["obj_id"]] = $rec["title"];
413 }
414 return $nodes;
415 }

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

+ Here is the call graph for this function:

◆ getAllStatus()

static ilSkillTreeNode::getAllStatus ( )
static

Get all status as array, key is value, value is lang text.

Definition at line 153 of file class.ilSkillTreeNode.php.

153 : array
154 {
155 global $DIC;
156
157 $lng = $DIC->language();
158
159 return array(
160 self::STATUS_DRAFT => $lng->txt("skmg_status_draft"),
161 self::STATUS_PUBLISH => $lng->txt("skmg_status_publish"),
162 self::STATUS_OUTDATED => $lng->txt("skmg_status_outdated")
163 );
164 }
$lng

References $DIC, and $lng.

Referenced by ilSkillTreeNodeGUI\addStatusInput().

+ Here is the caller graph for this function:

◆ getCreationDate()

ilSkillTreeNode::getCreationDate ( )

Definition at line 145 of file class.ilSkillTreeNode.php.

145 : string
146 {
148 }

References $creation_date.

◆ getDescription()

ilSkillTreeNode::getDescription ( )

Definition at line 85 of file class.ilSkillTreeNode.php.

85 : string
86 {
87 return $this->description;
88 }

References $description.

Referenced by ilBasicSkill\copy(), ilBasicSkillTemplate\copy(), ilSkillCategory\copy(), ilSkillTemplateCategory\copy(), ilSkillTemplateReference\copy(), create(), and update().

+ Here is the caller graph for this function:

◆ getIconPath()

static ilSkillTreeNode::getIconPath ( int  $a_obj_id,
string  $a_type,
string  $a_size = "",
int  $a_status = 0 
)
static

Definition at line 443 of file class.ilSkillTreeNode.php.

443 : string
444 {
445 if ($a_status == self::STATUS_DRAFT && $a_type == "sctp") {
446 $a_type = "scat";
447 }
448 if ($a_status == self::STATUS_DRAFT && $a_type == "sktp") {
449 $a_type = "skll";
450 }
451
452 $off = ($a_status == self::STATUS_DRAFT)
453 ? "_off"
454 : "";
455
456 $a_name = "icon_" . $a_type . $a_size . $off . ".svg";
457 if ($a_type == "sktr") {
460 if ($type == "sctp") {
461 $a_name = "icon_sctr" . $a_size . $off . ".svg";
462 }
463 }
464 $vers = "vers=" . str_replace(array(".", " "), "-", ILIAS_VERSION);
465 return ilUtil::getImagePath($a_name) . "?" . $vers;
466 }
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
const ILIAS_VERSION

References $type, ilSkillTemplateReference\_lookupTemplateId(), _lookupType(), ilUtil\getImagePath(), ILIAS_VERSION, and STATUS_DRAFT.

Referenced by ilSkillCatTableGUI\fillRow(), ilSkillTemplateTreeExplorerGUI\getNodeIcon(), ilSkillTreeExplorerGUI\getNodeIcon(), ilBasicSkillTemplateGUI\setLevelHead(), and ilSkillTreeNodeGUI\setTitleIcon().

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

◆ getId()

◆ getImportId()

ilSkillTreeNode::getImportId ( )

Definition at line 135 of file class.ilSkillTreeNode.php.

135 : string
136 {
137 return $this->import_id;
138 }

References $import_id.

Referenced by create(), and update().

+ Here is the caller graph for this function:

◆ getOrderNr()

ilSkillTreeNode::getOrderNr ( )

Definition at line 125 of file class.ilSkillTreeNode.php.

125 : int
126 {
127 return $this->order_nr;
128 }

References $order_nr.

Referenced by ilBasicSkill\copy(), ilBasicSkillTemplate\copy(), ilSkillCategory\copy(), ilSkillTemplateCategory\copy(), ilSkillTemplateReference\copy(), create(), and update().

+ Here is the caller graph for this function:

◆ getSelectableSkills()

static ilSkillTreeNode::getSelectableSkills ( )
static
Returns
array{obj_id: int, order_nr: int, status: int, self_eval: bool, title: string, type: string, create_date: string, description: string}[]

Definition at line 420 of file class.ilSkillTreeNode.php.

420 : array
421 {
422 global $DIC;
423
424 $ilDB = $DIC->database();
425
426 $set = $ilDB->query(
427 "SELECT * FROM skl_tree_node " .
428 " WHERE self_eval = " . $ilDB->quote(1, "integer")
429 );
430
431 $sel_skills = [];
432 while ($rec = $ilDB->fetchAssoc($set)) {
433 $rec['obj_id'] = (int) $rec['obj_id'];
434 $rec['order_nr'] = (int) $rec['order_nr'];
435 $rec['status'] = (int) $rec['status'];
436 $rec['self_eval'] = (bool) $rec['self_eval'];
437 $sel_skills[] = $rec;
438 }
439
440 return $sel_skills;
441 }

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

+ Here is the call graph for this function:

◆ getSelfEvaluation()

ilSkillTreeNode::getSelfEvaluation ( )

Definition at line 115 of file class.ilSkillTreeNode.php.

115 : bool
116 {
117 return $this->self_eval;
118 }

References $self_eval.

Referenced by ilBasicSkill\copy(), ilSkillCategory\copy(), ilSkillTemplateReference\copy(), create(), and update().

+ Here is the caller graph for this function:

◆ getStatus()

ilSkillTreeNode::getStatus ( )

Definition at line 282 of file class.ilSkillTreeNode.php.

282 : int
283 {
284 return $this->status;
285 }

References $status.

Referenced by create(), and update().

+ Here is the caller graph for this function:

◆ getStatusInfo()

static ilSkillTreeNode::getStatusInfo ( int  $a_status)
static

Definition at line 166 of file class.ilSkillTreeNode.php.

166 : string
167 {
168 global $DIC;
169
170 $lng = $DIC->language();
171
172 switch ($a_status) {
173 case self::STATUS_PUBLISH: return $lng->txt("skmg_status_publish_info");
174 case self::STATUS_DRAFT: return $lng->txt("skmg_status_draft_info");
175 case self::STATUS_OUTDATED: return $lng->txt("skmg_status_outdated_info");
176 }
177 return "";
178 }

References $DIC, $lng, STATUS_DRAFT, STATUS_OUTDATED, and STATUS_PUBLISH.

Referenced by ilSkillTreeNodeGUI\addStatusInput().

+ Here is the caller graph for this function:

◆ getTitle()

ilSkillTreeNode::getTitle ( )

Definition at line 75 of file class.ilSkillTreeNode.php.

75 : string
76 {
77 return $this->title;
78 }

References $title.

Referenced by ilBasicSkill\copy(), ilBasicSkillTemplate\copy(), ilSkillCategory\copy(), ilSkillTemplateCategory\copy(), ilSkillTemplateReference\copy(), create(), and update().

+ Here is the caller graph for this function:

◆ getType()

ilSkillTreeNode::getType ( )

Definition at line 95 of file class.ilSkillTreeNode.php.

95 : string
96 {
97 return $this->type;
98 }

References $type.

Referenced by ilBasicSkill\copy(), ilBasicSkillTemplate\copy(), ilSkillCategory\copy(), ilSkillTemplateCategory\copy(), ilSkillTemplateReference\copy(), create(), and ILIAS\Skill\Tree\SkillTreeNodeManager\putIntoTree().

+ Here is the caller graph for this function:

◆ read()

ilSkillTreeNode::read ( )

Read Data of Node.

Reimplemented in ilBasicSkill, and ilSkillTemplateReference.

Definition at line 183 of file class.ilSkillTreeNode.php.

183 : void
184 {
186
187 if (empty($this->data_record)) {
188 $query = "SELECT * FROM skl_tree_node WHERE obj_id = " .
189 $ilDB->quote($this->id, "integer");
190 $obj_set = $ilDB->query($query);
191 $this->data_record = $ilDB->fetchAssoc($obj_set);
192 }
193 $this->data_record["order_nr"] = (int) $this->data_record["order_nr"];
194 $this->data_record["self_eval"] = (bool) $this->data_record["self_eval"];
195 $this->data_record["status"] = (int) $this->data_record["status"];
196 $this->setType($this->data_record["type"]);
197 $this->setTitle($this->data_record["title"]);
198 $this->setDescription($this->data_record["description"] ?? "");
199 $this->setOrderNr($this->data_record["order_nr"]);
200 $this->setSelfEvaluation($this->data_record["self_eval"]);
201 $this->setStatus($this->data_record["status"]);
202 $this->setImportId($this->data_record["import_id"] ?? "");
203 $this->setCreationDate($this->data_record["creation_date"] ?? "");
204 }
setSelfEvaluation(bool $a_val)
setImportId(string $a_val)
setCreationDate(string $a_val)
setTitle(string $a_title)
setType(string $a_type)
setDescription(string $a_description)

References $db, $ilDB, $query, ILIAS\Repository\int(), setCreationDate(), setDescription(), setImportId(), setOrderNr(), setSelfEvaluation(), setStatus(), setTitle(), and setType().

Referenced by __construct().

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

◆ setCreationDate()

ilSkillTreeNode::setCreationDate ( string  $a_val)
protected

Definition at line 140 of file class.ilSkillTreeNode.php.

140 : void
141 {
142 $this->creation_date = $a_val;
143 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setDataRecord()

ilSkillTreeNode::setDataRecord ( array  $a_record)

this method should only be called by class ilSCORM2004NodeFactory

Definition at line 209 of file class.ilSkillTreeNode.php.

209 : void
210 {
211 $this->data_record = $a_record;
212 }

◆ setDescription()

ilSkillTreeNode::setDescription ( string  $a_description)

Definition at line 80 of file class.ilSkillTreeNode.php.

80 : void
81 {
82 $this->description = $a_description;
83 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setId()

ilSkillTreeNode::setId ( int  $a_id)

Definition at line 100 of file class.ilSkillTreeNode.php.

100 : void
101 {
102 $this->id = $a_id;
103 }

Referenced by create().

+ Here is the caller graph for this function:

◆ setImportId()

ilSkillTreeNode::setImportId ( string  $a_val)

Definition at line 130 of file class.ilSkillTreeNode.php.

130 : void
131 {
132 $this->import_id = $a_val;
133 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setOrderNr()

ilSkillTreeNode::setOrderNr ( int  $a_val)

Definition at line 120 of file class.ilSkillTreeNode.php.

120 : void
121 {
122 $this->order_nr = $a_val;
123 }

Referenced by ILIAS\Skill\Tree\SkillTreeNodeManager\putIntoTree(), and read().

+ Here is the caller graph for this function:

◆ setSelfEvaluation()

ilSkillTreeNode::setSelfEvaluation ( bool  $a_val)

Definition at line 110 of file class.ilSkillTreeNode.php.

110 : void
111 {
112 $this->self_eval = $a_val;
113 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setStatus()

ilSkillTreeNode::setStatus ( int  $a_val)

Definition at line 277 of file class.ilSkillTreeNode.php.

277 : void
278 {
279 $this->status = $a_val;
280 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setTitle()

ilSkillTreeNode::setTitle ( string  $a_title)

Definition at line 70 of file class.ilSkillTreeNode.php.

70 : void
71 {
72 $this->title = $a_title;
73 }

Referenced by read(), and SkillCategoryTest\testProperties().

+ Here is the caller graph for this function:

◆ setType()

ilSkillTreeNode::setType ( string  $a_type)

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

90 : void
91 {
92 $this->type = $a_type;
93 }

Referenced by ilBasicSkillTemplate\__construct(), ilSkillCategory\__construct(), ilSkillRoot\__construct(), ilSkillTemplateCategory\__construct(), ilSkillTemplateReference\__construct(), ilBasicSkill\__construct(), and read().

+ Here is the caller graph for this function:

◆ uniqueTypesCheck()

static ilSkillTreeNode::uniqueTypesCheck ( array  $a_items)
static

Check for unique types.

Definition at line 382 of file class.ilSkillTreeNode.php.

382 : bool
383 {
384 $types = [];
385 foreach ($a_items as $item) {
387 $types[$type] = $type;
388 }
389
390 if (count($types) > 1) {
391 return false;
392 }
393 return true;
394 }

References $type, and _lookupType().

Referenced by ilSkillTreeNodeGUI\copyItems(), and ilSkillTreeNodeGUI\cutItems().

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

◆ update()

ilSkillTreeNode::update ( )

Update Node.

Reimplemented in ilSkillTemplateReference.

Definition at line 354 of file class.ilSkillTreeNode.php.

355 {
357
358 $query = "UPDATE skl_tree_node SET " .
359 " title = " . $ilDB->quote($this->getTitle(), "text") .
360 " ,description = " . $ilDB->quote($this->getDescription(), "clob") .
361 " ,self_eval = " . $ilDB->quote((int) $this->getSelfEvaluation(), "integer") .
362 " ,order_nr = " . $ilDB->quote($this->getOrderNr(), "integer") .
363 " ,status = " . $ilDB->quote($this->getStatus(), "integer") .
364 " ,import_id = " . $ilDB->quote($this->getImportId(), "text") .
365 " WHERE obj_id = " . $ilDB->quote($this->getId(), "integer");
366
367 $ilDB->manipulate($query);
368 }

References $db, $ilDB, $query, getDescription(), getId(), getImportId(), getOrderNr(), getSelfEvaluation(), getStatus(), and getTitle().

Referenced by ILIAS\Skill\Tree\SkillTreeNodeManager\putIntoTree().

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

Field Documentation

◆ $creation_date

string ilSkillTreeNode::$creation_date = ""
protected

Definition at line 36 of file class.ilSkillTreeNode.php.

Referenced by getCreationDate().

◆ $data_record

array ilSkillTreeNode::$data_record = []
protected

Definition at line 51 of file class.ilSkillTreeNode.php.

◆ $db

ilDBInterface ilSkillTreeNode::$db
protected

◆ $description

string ilSkillTreeNode::$description = ""
protected

Definition at line 32 of file class.ilSkillTreeNode.php.

Referenced by getDescription().

◆ $id

int ilSkillTreeNode::$id = 0
protected

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

Referenced by create(), getAllCSkillIdsForNodeIds(), and getId().

◆ $import_id

string ilSkillTreeNode::$import_id = ""
protected

Definition at line 35 of file class.ilSkillTreeNode.php.

Referenced by getImportId().

◆ $order_nr

int ilSkillTreeNode::$order_nr = 0
protected

Definition at line 34 of file class.ilSkillTreeNode.php.

Referenced by getOrderNr().

◆ $self_eval

bool ilSkillTreeNode::$self_eval = false
protected

Definition at line 33 of file class.ilSkillTreeNode.php.

Referenced by getSelfEvaluation().

◆ $skill_service

ILIAS Skill Service SkillService ilSkillTreeNode::$skill_service
protected

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

◆ $status

int ilSkillTreeNode::$status = 0
protected

Definition at line 37 of file class.ilSkillTreeNode.php.

Referenced by getStatus().

◆ $title

string ilSkillTreeNode::$title = ""
protected

Definition at line 31 of file class.ilSkillTreeNode.php.

Referenced by getTitle().

◆ $type

string ilSkillTreeNode::$type = ""
protected

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

Referenced by getIconPath(), getType(), and uniqueTypesCheck().

◆ STATUS_DRAFT

◆ STATUS_OUTDATED

const ilSkillTreeNode::STATUS_OUTDATED = 2

◆ STATUS_PUBLISH

const ilSkillTreeNode::STATUS_PUBLISH = 0

Definition at line 53 of file class.ilSkillTreeNode.php.

Referenced by ilSkillTreeNodeGUI\addStatusInput(), and getStatusInfo().


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