ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilSkillTreeNode Class Reference

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

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 26 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 58 of file class.ilSkillTreeNode.php.

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

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 215 of file class.ilSkillTreeNode.php.

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

References $DIC, and $ilDB.

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 237 of file class.ilSkillTreeNode.php.

237 : string
238 {
239 global $DIC;
240
241 $ilDB = $DIC->database();
242
243 return (string) self::_lookup($a_obj_id, "description");
244 }
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 246 of file class.ilSkillTreeNode.php.

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

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 255 of file class.ilSkillTreeNode.php.

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

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 229 of file class.ilSkillTreeNode.php.

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

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

Referenced by ilSurveySkillThresholdsTableGUI\__construct(), ilPersonalSkillsGUI\assignMaterials(), ILIAS\Skill\Node\SkillTreeNodeManager\clipboardCopy(), ilTestSkillLevelThresholdsTableGUI\completeCompetenceTitles(), ilSkillProfileGUI\confirmLevelAssignmentRemoval(), ilContSkillAdminGUI\confirmRemoveSelectedSkill(), ilPersonalSkillsGUI\confirmSkillRemove(), ilSurveySkillAssignmentTableGUI\fillRow(), ilSurveySkillTableGUI\fillRow(), ilSurveySkill\getAllAssignedSkillsAsOptions(), ilSkillLearningHistoryProvider\getEntries(), ilTestSkillLevelThresholdImportFails\getFailedImportsMessage(), ILIAS\Skill\Personal\PersonalSkillDBRepository\getFromRecord(), ilSkillTemplateTreeExplorerGUI\getNodeContent(), ilSkillTreeExplorerGUI\getNodeContent(), ILIAS\Container\Skills\ContainerSkillManager\getProfileSkills(), ILIAS\Container\Skills\ContainerSkillManager\getSingleSkills(), ilSurveySkillTableGUI\getSkills(), ilContSkillAdminGUI\initCompetenceAssignmentForm(), ilAssQuestionSkillAssignment\loadAdditionalSkillData(), ILIAS\Skill\Usage\UsagesUI\render(), ilPersonalSkillsGUI\saveSelfEvaluation(), 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 301 of file class.ilSkillTreeNode.php.

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

References $DIC, and $ilDB.

◆ _writeOrderNr()

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

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

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

References $DIC, and $ilDB.

Referenced by ILIAS\Skill\Node\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 288 of file class.ilSkillTreeNode.php.

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

References $DIC, and $ilDB.

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

+ Here is the caller graph for this function:

◆ create()

ilSkillTreeNode::create ( )

Create Node.

Reimplemented in ilBasicSkill, and ilSkillTemplateReference.

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

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

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

+ Here is the call graph for this function:

◆ delete()

ilSkillTreeNode::delete ( )

Reimplemented in ilBasicSkillTemplate, ilSkillTemplateCategory, and ilSkillTemplateReference.

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

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

References $db, $ilDB, 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 472 of file class.ilSkillTreeNode.php.

472 : array
473 {
474 $cskill_ids = [];
475 foreach ($a_node_ids as $id) {
476 if (in_array(self::_lookupType($id), array("skll", "scat", "sktr"))) {
477 $skill_id = $id;
478 $tref_id = 0;
479 if (ilSkillTreeNode::_lookupType($id) == "sktr") {
481 $tref_id = $id;
482 }
483 $cskill_ids[] = array("skill_id" => $skill_id, "tref_id" => $tref_id);
484 }
485 if (in_array(ilSkillTreeNode::_lookupType($id), array("sktp", "sctp"))) {
487 $cskill_ids[] = array("skill_id" => $id, "tref_id" => $tref_id);
488 }
489 }
490 // for cats, skills and template references, get "real" usages
491 // for skill and category templates check usage in references
492 }
493 return $cskill_ids;
494 }
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 400 of file class.ilSkillTreeNode.php.

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

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 154 of file class.ilSkillTreeNode.php.

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

References $DIC, and $lng.

Referenced by ilSkillTreeNodeGUI\addStatusInput().

+ Here is the caller graph for this function:

◆ getCreationDate()

ilSkillTreeNode::getCreationDate ( )

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

146 : string
147 {
149 }

References $creation_date.

◆ getDescription()

ilSkillTreeNode::getDescription ( )

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

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

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 444 of file class.ilSkillTreeNode.php.

444 : string
445 {
446 if ($a_status == self::STATUS_DRAFT && $a_type == "sctp") {
447 $a_type = "scat";
448 }
449 if ($a_status == self::STATUS_DRAFT && $a_type == "sktp") {
450 $a_type = "skll";
451 }
452
453 $off = ($a_status == self::STATUS_DRAFT)
454 ? "_off"
455 : "";
456
457 $a_name = "standard/icon_" . $a_type . $a_size . $off . ".svg";
458 if ($a_type == "sktr") {
461 if ($type == "sctp") {
462 $a_name = "standard/icon_sctr" . $a_size . $off . ".svg";
463 }
464 }
465 $vers = "vers=" . str_replace(array(".", " "), "-", ILIAS_VERSION);
466 return ilUtil::getImagePath($a_name) . "?" . $vers;
467 }
static getImagePath(string $image_name, 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()

ilSkillTreeNode::getId ( )

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

106 : int
107 {
108 return $this->id;
109 }

References $id.

Referenced by ilBasicSkill\addLevel(), delete(), ilBasicSkill\fixLevelNumbering(), ilBasicSkill\getLevelData(), ILIAS\Skill\Node\SkillTreeNodeManager\putIntoTree(), and update().

+ Here is the caller graph for this function:

◆ getImportId()

ilSkillTreeNode::getImportId ( )

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

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

References $import_id.

Referenced by create(), and update().

+ Here is the caller graph for this function:

◆ getOrderNr()

ilSkillTreeNode::getOrderNr ( )

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

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

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 421 of file class.ilSkillTreeNode.php.

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

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

+ Here is the call graph for this function:

◆ getSelfEvaluation()

ilSkillTreeNode::getSelfEvaluation ( )

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

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

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 283 of file class.ilSkillTreeNode.php.

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

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 167 of file class.ilSkillTreeNode.php.

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

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 76 of file class.ilSkillTreeNode.php.

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

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 96 of file class.ilSkillTreeNode.php.

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

References $type.

Referenced by ilBasicSkill\copy(), ilBasicSkillTemplate\copy(), ilSkillCategory\copy(), ilSkillTemplateCategory\copy(), ilSkillTemplateReference\copy(), create(), and ILIAS\Skill\Node\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 184 of file class.ilSkillTreeNode.php.

184 : void
185 {
187
188 if (empty($this->data_record)) {
189 $query = "SELECT * FROM skl_tree_node WHERE obj_id = " .
190 $ilDB->quote($this->id, "integer");
191 $obj_set = $ilDB->query($query);
192 $this->data_record = $ilDB->fetchAssoc($obj_set);
193 }
194 $this->data_record["order_nr"] = (int) $this->data_record["order_nr"];
195 $this->data_record["self_eval"] = (bool) $this->data_record["self_eval"];
196 $this->data_record["status"] = (int) $this->data_record["status"];
197 $this->setType($this->data_record["type"]);
198 $this->setTitle($this->data_record["title"]);
199 $this->setDescription($this->data_record["description"] ?? "");
200 $this->setOrderNr($this->data_record["order_nr"]);
201 $this->setSelfEvaluation($this->data_record["self_eval"]);
202 $this->setStatus($this->data_record["status"]);
203 $this->setImportId($this->data_record["import_id"] ?? "");
204 $this->setCreationDate($this->data_record["creation_date"] ?? "");
205 }
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, 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 141 of file class.ilSkillTreeNode.php.

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

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 210 of file class.ilSkillTreeNode.php.

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

◆ setDescription()

ilSkillTreeNode::setDescription ( string  $a_description)

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

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

Referenced by read().

+ Here is the caller graph for this function:

◆ setId()

ilSkillTreeNode::setId ( int  $a_id)

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

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

Referenced by create().

+ Here is the caller graph for this function:

◆ setImportId()

ilSkillTreeNode::setImportId ( string  $a_val)

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

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

Referenced by read().

+ Here is the caller graph for this function:

◆ setOrderNr()

ilSkillTreeNode::setOrderNr ( int  $a_val)

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

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

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

+ Here is the caller graph for this function:

◆ setSelfEvaluation()

ilSkillTreeNode::setSelfEvaluation ( bool  $a_val)

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

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

Referenced by read().

+ Here is the caller graph for this function:

◆ setStatus()

ilSkillTreeNode::setStatus ( int  $a_val)

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

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

Referenced by read().

+ Here is the caller graph for this function:

◆ setTitle()

ilSkillTreeNode::setTitle ( string  $a_title)

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

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

Referenced by read(), and ILIAS\Skill\Node\SkillCategoryTest\testProperties().

+ Here is the caller graph for this function:

◆ setType()

ilSkillTreeNode::setType ( string  $a_type)

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

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

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 383 of file class.ilSkillTreeNode.php.

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

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 355 of file class.ilSkillTreeNode.php.

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

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

Referenced by ILIAS\Skill\Node\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 37 of file class.ilSkillTreeNode.php.

Referenced by getCreationDate().

◆ $data_record

array ilSkillTreeNode::$data_record = []
protected

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

◆ $db

ilDBInterface ilSkillTreeNode::$db
protected

◆ $description

string ilSkillTreeNode::$description = ""
protected

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

Referenced by getDescription().

◆ $id

int ilSkillTreeNode::$id = 0
protected

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

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

◆ $import_id

string ilSkillTreeNode::$import_id = ""
protected

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

Referenced by getImportId().

◆ $order_nr

int ilSkillTreeNode::$order_nr = 0
protected

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

Referenced by getOrderNr().

◆ $self_eval

bool ilSkillTreeNode::$self_eval = false
protected

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

Referenced by getSelfEvaluation().

◆ $skill_service

ILIAS Skill Service SkillService ilSkillTreeNode::$skill_service
protected

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

◆ $status

int ilSkillTreeNode::$status = 0
protected

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

Referenced by getStatus().

◆ $title

string ilSkillTreeNode::$title = ""
protected

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

Referenced by getTitle().

◆ $type

string ilSkillTreeNode::$type = ""
protected

Definition at line 30 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 54 of file class.ilSkillTreeNode.php.

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


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