ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
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)

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

References $DIC, and read().

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

References $DIC, $ilDB, and $query.

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  }
global $DIC
Definition: feed.php:28
$query

◆ _lookupDescription()

static ilSkillTreeNode::_lookupDescription ( int  $a_obj_id)
static

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

References $DIC, and $ilDB.

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

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

References $DIC, and $ilDB.

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

245  : bool
246  {
247  global $DIC;
248 
249  $ilDB = $DIC->database();
250 
251  return (bool) self::_lookup($a_obj_id, "self_eval");
252  }
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 254 of file class.ilSkillTreeNode.php.

References $DIC, and $ilDB.

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

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

References ilSkillTemplateReference\_lookupTemplateId().

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

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  }
+ 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 263 of file class.ilSkillTreeNode.php.

References $DIC, $ilDB, and $query.

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

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

◆ _writeDescription()

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

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

References $DIC, $ilDB, and $query.

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  }
global $DIC
Definition: feed.php:28
$query

◆ _writeOrderNr()

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

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

References $DIC, $ilDB, and $query.

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

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  }
global $DIC
Definition: feed.php:28
$query
+ 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.

References $DIC, $ilDB, and $query.

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

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  }
global $DIC
Definition: feed.php:28
$query
+ Here is the caller graph for this function:

◆ create()

ilSkillTreeNode::create ( )

Create Node.

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

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

328  : void
329  {
330  $ilDB = $this->db;
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  }
$query
+ Here is the call graph for this function:

◆ delete()

ilSkillTreeNode::delete ( )

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

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

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

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

Referenced by ilSkillTreeNodeGUI\isInUse().

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"))) {
485  foreach (ilSkillTemplateReference::_lookupTrefIdsForTemplateId($id) as $tref_id) {
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)
+ 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.

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

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

References $DIC, and $lng.

Referenced by ilSkillTreeNodeGUI\addStatusInput().

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
global $DIC
Definition: feed.php:28
+ Here is the caller graph for this function:

◆ getCreationDate()

ilSkillTreeNode::getCreationDate ( )

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

References $creation_date.

145  : string
146  {
147  return $this->creation_date;
148  }

◆ getDescription()

ilSkillTreeNode::getDescription ( )

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

References $description.

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

85  : string
86  {
87  return $this->description;
88  }
+ 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.

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

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

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

References $import_id.

Referenced by create(), and update().

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

◆ getOrderNr()

ilSkillTreeNode::getOrderNr ( )

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

References $order_nr.

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

125  : int
126  {
127  return $this->order_nr;
128  }
+ 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.

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

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  }
global $DIC
Definition: feed.php:28
+ Here is the call graph for this function:

◆ getSelfEvaluation()

ilSkillTreeNode::getSelfEvaluation ( )

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

References $self_eval.

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

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

◆ getStatus()

ilSkillTreeNode::getStatus ( )

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

References $status.

Referenced by create(), and update().

282  : int
283  {
284  return $this->status;
285  }
+ 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.

References $DIC, and $lng.

Referenced by ilSkillTreeNodeGUI\addStatusInput().

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  }
$lng
global $DIC
Definition: feed.php:28
+ Here is the caller graph for this function:

◆ getTitle()

ilSkillTreeNode::getTitle ( )

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

References $title.

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

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

◆ getType()

ilSkillTreeNode::getType ( )

◆ read()

ilSkillTreeNode::read ( )

Read Data of Node.

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

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

Referenced by __construct().

183  : void
184  {
185  $ilDB = $this->db;
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  }
setType(string $a_type)
setImportId(string $a_val)
setSelfEvaluation(bool $a_val)
setTitle(string $a_title)
setDescription(string $a_description)
setCreationDate(string $a_val)
$query
+ 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.

Referenced by read().

140  : void
141  {
142  $this->creation_date = $a_val;
143  }
+ 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.

Referenced by read().

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

◆ setId()

ilSkillTreeNode::setId ( int  $a_id)

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

Referenced by create().

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

◆ setImportId()

ilSkillTreeNode::setImportId ( string  $a_val)

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

Referenced by read().

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

◆ setOrderNr()

ilSkillTreeNode::setOrderNr ( int  $a_val)

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

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

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

◆ setSelfEvaluation()

ilSkillTreeNode::setSelfEvaluation ( bool  $a_val)

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

Referenced by read().

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

◆ setStatus()

ilSkillTreeNode::setStatus ( int  $a_val)

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

Referenced by read().

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

◆ setTitle()

ilSkillTreeNode::setTitle ( string  $a_title)

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

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

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

◆ setType()

ilSkillTreeNode::setType ( string  $a_type)

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

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

90  : void
91  {
92  $this->type = $a_type;
93  }
+ 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.

References $type, and _lookupType().

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

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

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

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

355  {
356  $ilDB = $this->db;
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  }
$query
+ 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 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 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().


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