ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
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 27 of file class.ilSkillTreeNode.php.

Constructor & Destructor Documentation

◆ __construct()

ilSkillTreeNode::__construct ( int  $a_id = 0)

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

References $DIC, and read().

60  {
61  global $DIC;
62 
63  $this->db = $DIC->database();
64  $this->id = $a_id;
65 
66  if ($a_id != 0) {
67  $this->read();
68  }
69  $this->skill_service = $DIC->skills();
70  }
read()
Read Data of Node.
global $DIC
Definition: feed.php:28
+ 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 216 of file class.ilSkillTreeNode.php.

References $DIC, and $ilDB.

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

◆ _lookupDescription()

static ilSkillTreeNode::_lookupDescription ( int  $a_obj_id)
static

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

References $DIC, and $ilDB.

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

238  : string
239  {
240  global $DIC;
241 
242  $ilDB = $DIC->database();
243 
244  return (string) self::_lookup($a_obj_id, "description");
245  }
global $DIC
Definition: feed.php:28
+ Here is the caller graph for this function:

◆ _lookupSelfEvaluation()

static ilSkillTreeNode::_lookupSelfEvaluation ( int  $a_obj_id)
static

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

References $DIC, and $ilDB.

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

247  : bool
248  {
249  global $DIC;
250 
251  $ilDB = $DIC->database();
252 
253  return (bool) self::_lookup($a_obj_id, "self_eval");
254  }
global $DIC
Definition: feed.php:28
+ Here is the caller graph for this function:

◆ _lookupStatus()

static ilSkillTreeNode::_lookupStatus ( int  $a_obj_id)
static

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

References $DIC, and $ilDB.

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

256  : int
257  {
258  global $DIC;
259 
260  $ilDB = $DIC->database();
261 
262  return (int) self::_lookup($a_obj_id, "status");
263  }
global $DIC
Definition: feed.php:28
+ 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 230 of file class.ilSkillTreeNode.php.

References ilSkillTemplateReference\_lookupTemplateId().

Referenced by ilSurveySkillThresholdsTableGUI\__construct(), ilPersonalSkillsGUI\assignMaterials(), ILIAS\Skill\Node\SkillTreeNodeManager\clipboardCopy(), ilTestSkillLevelThresholdsTableGUI\completeCompetenceTitles(), ilSkillProfileGUI\confirmLevelAssignmentRemoval(), ilContSkillAdminGUI\confirmRemoveSelectedSkill(), ilPersonalSkillsGUI\confirmSkillRemove(), ilSurveySkillTableGUI\fillRow(), ilContSkillMemberTableGUI\fillRow(), ilSurveySkillAssignmentTableGUI\fillRow(), ilSurveySkill\getAllAssignedSkillsAsOptions(), ilSkillLearningHistoryProvider\getEntries(), ilTestSkillLevelThresholdImportFails\getFailedImportsMessage(), ILIAS\Skill\Personal\PersonalSkillDBRepository\getFromRecord(), ilSkillTreeExplorerGUI\getNodeContent(), ilSkillTemplateTreeExplorerGUI\getNodeContent(), ILIAS\Container\Skills\ContainerSkillManager\getProfileSkills(), ILIAS\Container\Skills\ContainerSkillManager\getSingleSkills(), ilSurveySkillTableGUI\getSkills(), ilContSkillAdminGUI\initCompetenceAssignmentForm(), ilObjPortfolioGUI\initCreatePortfolioFromTemplateForm(), ilAssQuestionSkillAssignment\loadAdditionalSkillData(), ILIAS\Skill\Usage\UsagesUI\render(), ilPersonalSkillsGUI\renderSkillHTML(), ilPortfolioPageGUI\renderSkillsTeaser(), ilPersonalSkillsGUI\saveSelfEvaluation(), ilPersonalSkillsGUI\selfEvaluation(), ilSkillNotifications\sendMail(), ilPersonalSkillsGUI\setGapAnalysisActualStatusModePerObject(), ilSkillTemplateReferenceGUI\setTabs(), ilSkillCategoryGUI\setTabs(), ilSkillTemplateCategoryGUI\setTabs(), ilBasicSkillTemplateGUI\setTabs(), and ilBasicSkillGUI\setTabs().

230  : string
231  {
232  if ($a_tref_id > 0 && ilSkillTemplateReference::_lookupTemplateId($a_tref_id) == $a_obj_id) {
233  return self::_lookup($a_tref_id, "title");
234  }
235  return (string) self::_lookup($a_obj_id, "title");
236  }
+ 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

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

References $DIC, and $ilDB.

Referenced by ilSkillTreeNodeGUI\__construct(), ilVirtualSkillTree\__getSubTreeRec(), ilPersonalSkillsGUI\assignMaterials(), ilPersonalSkillExplorerGUI\buildSelectableTree(), ILIAS\Skill\Node\SkillTreeNodeManager\clipboardCopy(), ilCOPageHTMLExport\collectPageElements(), ilObjSkillTreeGUI\deleteNodes(), getAllCSkillIdsForNodeIds(), ilSkillDataSet\getDependencies(), getIconPath(), ilVirtualSkillTreeExplorerGUI\getNodeIcon(), ilVirtualSkillTree\getSubTreeForCSkillId(), ilSkillDataSet\importRecord(), ilSkillTemplateReferenceGUI\listItems(), ilSkillSelectorGUI\nodeHasAction(), ILIAS\Skill\Node\SkillTreeNodeManager\pasteTree(), ILIAS\Skill\Node\SkillTreeNodeManager\putIntoTree(), ilSkillCategoryGUI\redirectToParent(), ilSkillTreeNodeGUI\redirectToParent(), ilBasicSkillGUI\redirectToParent(), ilPersonalSkillsGUI\renderSkillHTML(), ilPersonalSkillsGUI\saveSelfEvaluation(), ilPersonalSkillsGUI\selfEvaluation(), ilSkillTemplateReferenceGUI\setTabs(), ilSkillCategoryGUI\setTabs(), ilSkillTemplateCategoryGUI\setTabs(), ilBasicSkillTemplateGUI\setTabs(), ilBasicSkillGUI\setTabs(), ilObjSkillTreeGUI\showTree(), and uniqueTypesCheck().

265  : string
266  {
267  global $DIC;
268 
269  $ilDB = $DIC->database();
270 
271  $query = "SELECT * FROM skl_tree_node WHERE obj_id = " .
272  $ilDB->quote($a_obj_id, "integer");
273  $obj_set = $ilDB->query($query);
274  $obj_rec = $ilDB->fetchAssoc($obj_set);
275 
276  return $obj_rec["type"] ?? "";
277  }
global $DIC
Definition: feed.php:28
+ Here is the caller graph for this function:

◆ _writeDescription()

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

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

References $DIC, and $ilDB.

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

◆ _writeOrderNr()

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

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

References $DIC, and $ilDB.

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

315  : void
316  {
317  global $DIC;
318 
319  $ilDB = $DIC->database();
320 
321  $query = "UPDATE skl_tree_node SET " .
322  " order_nr = " . $ilDB->quote($a_nr, "integer") .
323  " WHERE obj_id = " . $ilDB->quote($a_obj_id, "integer");
324  $ilDB->manipulate($query);
325  }
global $DIC
Definition: feed.php:28
+ Here is the caller graph for this function:

◆ _writeTitle()

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

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

References $DIC, and $ilDB.

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

289  : void
290  {
291  global $DIC;
292 
293  $ilDB = $DIC->database();
294 
295  $query = "UPDATE skl_tree_node SET " .
296  " title = " . $ilDB->quote($a_title, "text") .
297  " WHERE obj_id = " . $ilDB->quote($a_obj_id, "integer");
298 
299  $ilDB->manipulate($query);
300  }
global $DIC
Definition: feed.php:28
+ Here is the caller graph for this function:

◆ create()

ilSkillTreeNode::create ( )

Create Node.

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

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

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

◆ delete()

ilSkillTreeNode::delete ( )

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

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

372  : void
373  {
374  $ilDB = $this->db;
375 
376  $query = "DELETE FROM skl_tree_node WHERE obj_id= " .
377  $ilDB->quote($this->getId(), "integer");
378  $ilDB->manipulate($query);
379  }
+ 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 473 of file class.ilSkillTreeNode.php.

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

Referenced by ilSkillTreeNodeGUI\isInUse().

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

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

401  : array
402  {
403  global $DIC;
404 
405  $ilDB = $DIC->database();
406 
407  $set = $ilDB->query(
408  "SELECT obj_id, title FROM skl_tree_node WHERE " .
409  " self_eval = " . $ilDB->quote(true, "integer") . " ORDER BY TITLE "
410  );
411  $nodes = [];
412  while ($rec = $ilDB->fetchAssoc($set)) {
413  $rec["obj_id"] = (int) $rec["obj_id"];
414  $nodes[$rec["obj_id"]] = $rec["title"];
415  }
416  return $nodes;
417  }
global $DIC
Definition: feed.php:28
+ 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 155 of file class.ilSkillTreeNode.php.

References $DIC, and $lng.

Referenced by ilSkillTreeNodeGUI\addStatusInput().

155  : array
156  {
157  global $DIC;
158 
159  $lng = $DIC->language();
160 
161  return array(
162  self::STATUS_DRAFT => $lng->txt("skmg_status_draft"),
163  self::STATUS_PUBLISH => $lng->txt("skmg_status_publish"),
164  self::STATUS_OUTDATED => $lng->txt("skmg_status_outdated")
165  );
166  }
global $DIC
Definition: feed.php:28
$lng
+ Here is the caller graph for this function:

◆ getCreationDate()

ilSkillTreeNode::getCreationDate ( )

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

References $creation_date.

147  : string
148  {
149  return $this->creation_date;
150  }

◆ getDescription()

ilSkillTreeNode::getDescription ( )

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

References $description.

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

87  : string
88  {
89  return $this->description;
90  }
+ 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 445 of file class.ilSkillTreeNode.php.

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

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

445  : string
446  {
447  if ($a_status == self::STATUS_DRAFT && $a_type == "sctp") {
448  $a_type = "scat";
449  }
450  if ($a_status == self::STATUS_DRAFT && $a_type == "sktp") {
451  $a_type = "skll";
452  }
453 
454  $off = ($a_status == self::STATUS_DRAFT)
455  ? "_off"
456  : "";
457 
458  $a_name = "standard/icon_" . $a_type . $a_size . $off . ".svg";
459  if ($a_type == "sktr") {
462  if ($type == "sctp") {
463  $a_name = "standard/icon_sctr" . $a_size . $off . ".svg";
464  }
465  }
466  $vers = "vers=" . str_replace(array(".", " "), "-", ILIAS_VERSION);
467  return ilUtil::getImagePath($a_name) . "?" . $vers;
468  }
const ILIAS_VERSION
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
static _lookupType(int $a_obj_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getId()

◆ getImportId()

ilSkillTreeNode::getImportId ( )

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

References $import_id.

Referenced by create(), and update().

137  : string
138  {
139  return $this->import_id;
140  }
+ Here is the caller graph for this function:

◆ getOrderNr()

ilSkillTreeNode::getOrderNr ( )

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

References $order_nr.

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

127  : int
128  {
129  return $this->order_nr;
130  }
+ 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 422 of file class.ilSkillTreeNode.php.

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

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

◆ getSelfEvaluation()

ilSkillTreeNode::getSelfEvaluation ( )

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

References $self_eval.

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

117  : bool
118  {
119  return $this->self_eval;
120  }
+ Here is the caller graph for this function:

◆ getStatus()

ilSkillTreeNode::getStatus ( )

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

References $status.

Referenced by create(), and update().

284  : int
285  {
286  return $this->status;
287  }
+ Here is the caller graph for this function:

◆ getStatusInfo()

static ilSkillTreeNode::getStatusInfo ( int  $a_status)
static

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

References $DIC, and $lng.

Referenced by ilSkillTreeNodeGUI\addStatusInput().

168  : string
169  {
170  global $DIC;
171 
172  $lng = $DIC->language();
173 
174  switch ($a_status) {
175  case self::STATUS_PUBLISH: return $lng->txt("skmg_status_publish_info");
176  case self::STATUS_DRAFT: return $lng->txt("skmg_status_draft_info");
177  case self::STATUS_OUTDATED: return $lng->txt("skmg_status_outdated_info");
178  }
179  return "";
180  }
global $DIC
Definition: feed.php:28
$lng
+ Here is the caller graph for this function:

◆ getTitle()

ilSkillTreeNode::getTitle ( )

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

References $title.

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

77  : string
78  {
79  return $this->title;
80  }
+ Here is the caller graph for this function:

◆ getType()

ilSkillTreeNode::getType ( )

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

References $type.

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

97  : string
98  {
99  return $this->type;
100  }
+ Here is the caller graph for this function:

◆ read()

ilSkillTreeNode::read ( )

Read Data of Node.

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

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

Referenced by __construct().

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

Referenced by read().

142  : void
143  {
144  $this->creation_date = $a_val;
145  }
+ 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 211 of file class.ilSkillTreeNode.php.

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

◆ setDescription()

ilSkillTreeNode::setDescription ( string  $a_description)

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

Referenced by read().

82  : void
83  {
84  $this->description = $a_description;
85  }
+ Here is the caller graph for this function:

◆ setId()

ilSkillTreeNode::setId ( int  $a_id)

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

Referenced by create().

102  : void
103  {
104  $this->id = $a_id;
105  }
+ Here is the caller graph for this function:

◆ setImportId()

ilSkillTreeNode::setImportId ( string  $a_val)

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

Referenced by read().

132  : void
133  {
134  $this->import_id = $a_val;
135  }
+ Here is the caller graph for this function:

◆ setOrderNr()

ilSkillTreeNode::setOrderNr ( int  $a_val)

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

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

122  : void
123  {
124  $this->order_nr = $a_val;
125  }
+ Here is the caller graph for this function:

◆ setSelfEvaluation()

ilSkillTreeNode::setSelfEvaluation ( bool  $a_val)

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

Referenced by read().

112  : void
113  {
114  $this->self_eval = $a_val;
115  }
+ Here is the caller graph for this function:

◆ setStatus()

ilSkillTreeNode::setStatus ( int  $a_val)

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

Referenced by read().

279  : void
280  {
281  $this->status = $a_val;
282  }
+ Here is the caller graph for this function:

◆ setTitle()

ilSkillTreeNode::setTitle ( string  $a_title)

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

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

72  : void
73  {
74  $this->title = $a_title;
75  }
+ Here is the caller graph for this function:

◆ setType()

ilSkillTreeNode::setType ( string  $a_type)

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

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

92  : void
93  {
94  $this->type = $a_type;
95  }
+ Here is the caller graph for this function:

◆ uniqueTypesCheck()

static ilSkillTreeNode::uniqueTypesCheck ( array  $a_items)
static

Check for unique types.

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

References $type, and _lookupType().

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

384  : bool
385  {
386  $types = [];
387  foreach ($a_items as $item) {
389  $types[$type] = $type;
390  }
391 
392  if (count($types) > 1) {
393  return false;
394  }
395  return true;
396  }
static _lookupType(int $a_obj_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ update()

ilSkillTreeNode::update ( )

Update Node.

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

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

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

357  {
358  $ilDB = $this->db;
359 
360  $query = "UPDATE skl_tree_node SET " .
361  " title = " . $ilDB->quote($this->getTitle(), "text") .
362  " ,description = " . $ilDB->quote($this->getDescription(), "clob") .
363  " ,self_eval = " . $ilDB->quote((int) $this->getSelfEvaluation(), "integer") .
364  " ,order_nr = " . $ilDB->quote($this->getOrderNr(), "integer") .
365  " ,status = " . $ilDB->quote($this->getStatus(), "integer") .
366  " ,import_id = " . $ilDB->quote($this->getImportId(), "text") .
367  " WHERE obj_id = " . $ilDB->quote($this->getId(), "integer");
368 
369  $ilDB->manipulate($query);
370  }
+ 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 38 of file class.ilSkillTreeNode.php.

Referenced by getCreationDate().

◆ $data_record

array ilSkillTreeNode::$data_record = []
protected

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

◆ $db

ilDBInterface ilSkillTreeNode::$db
protected

◆ $description

string ilSkillTreeNode::$description = ""
protected

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

Referenced by getDescription().

◆ $id

int ilSkillTreeNode::$id = 0
protected

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

Referenced by getAllCSkillIdsForNodeIds(), and getId().

◆ $import_id

string ilSkillTreeNode::$import_id = ""
protected

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

Referenced by getImportId().

◆ $order_nr

int ilSkillTreeNode::$order_nr = 0
protected

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

Referenced by getOrderNr().

◆ $self_eval

bool ilSkillTreeNode::$self_eval = false
protected

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

Referenced by getSelfEvaluation().

◆ $skill_service

ILIAS Skill Service SkillService ilSkillTreeNode::$skill_service
protected

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

◆ $status

int ilSkillTreeNode::$status = 0
protected

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

Referenced by getStatus().

◆ $title

string ilSkillTreeNode::$title = ""
protected

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

Referenced by getTitle().

◆ $type

string ilSkillTreeNode::$type = ""
protected

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

Referenced by getType(), and uniqueTypesCheck().

◆ STATUS_DRAFT

◆ STATUS_OUTDATED

const ilSkillTreeNode::STATUS_OUTDATED = 2

◆ STATUS_PUBLISH

const ilSkillTreeNode::STATUS_PUBLISH = 0

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

Referenced by ilSkillTreeNodeGUI\addStatusInput().


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