ILIAS  trunk Revision v11.0_alpha-1744-gb0451eebef4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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)

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

References $DIC, and read().

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

References $DIC, $ilDB, and null.

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  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
global $DIC
Definition: shib_login.php:22

◆ _lookupDescription()

static ilSkillTreeNode::_lookupDescription ( int  $a_obj_id)
static

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

References $DIC, and $ilDB.

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

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

References $DIC, and $ilDB.

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

246  : bool
247  {
248  global $DIC;
249 
250  $ilDB = $DIC->database();
251 
252  return (bool) self::_lookup($a_obj_id, "self_eval");
253  }
global $DIC
Definition: shib_login.php:22
+ 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.

References $DIC, and $ilDB.

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

255  : int
256  {
257  global $DIC;
258 
259  $ilDB = $DIC->database();
260 
261  return (int) self::_lookup($a_obj_id, "status");
262  }
global $DIC
Definition: shib_login.php:22
+ 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.

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(), ilSkillCategoryGUI\setTabs(), ilSkillTemplateReferenceGUI\setTabs(), ilSkillTemplateCategoryGUI\setTabs(), ilBasicSkillTemplateGUI\setTabs(), and ilBasicSkillGUI\setTabs().

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  }
+ 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 264 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().

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

◆ _writeDescription()

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

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

References $DIC, and $ilDB.

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  }
global $DIC
Definition: shib_login.php:22

◆ _writeOrderNr()

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

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

References $DIC, and $ilDB.

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

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  }
global $DIC
Definition: shib_login.php:22
+ 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.

References $DIC, and $ilDB.

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

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

◆ create()

ilSkillTreeNode::create ( )

Create Node.

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

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

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

◆ delete()

ilSkillTreeNode::delete ( )

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

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

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

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

Referenced by ilSkillTreeNodeGUI\isInUse().

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

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

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  }
global $DIC
Definition: shib_login.php:22
+ 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.

References $DIC, and $lng.

Referenced by ilSkillTreeNodeGUI\addStatusInput().

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 $DIC
Definition: shib_login.php:22
global $lng
Definition: privfeed.php:31
+ Here is the caller graph for this function:

◆ getCreationDate()

ilSkillTreeNode::getCreationDate ( )

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

References $creation_date.

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

◆ getDescription()

ilSkillTreeNode::getDescription ( )

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

References $description.

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

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

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

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

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 _lookupType(int $a_obj_id)
const ILIAS_VERSION
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getId()

◆ getImportId()

ilSkillTreeNode::getImportId ( )

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

References $import_id.

Referenced by create(), and update().

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

◆ getOrderNr()

ilSkillTreeNode::getOrderNr ( )

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

References $order_nr.

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

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

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

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

◆ getSelfEvaluation()

ilSkillTreeNode::getSelfEvaluation ( )

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

References $self_eval.

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

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

◆ getStatus()

ilSkillTreeNode::getStatus ( )

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

References $status.

Referenced by create(), and update().

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

References $DIC, and $lng.

Referenced by ilSkillTreeNodeGUI\addStatusInput().

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

◆ getTitle()

ilSkillTreeNode::getTitle ( )

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

References $title.

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

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

◆ getType()

ilSkillTreeNode::getType ( )

◆ read()

ilSkillTreeNode::read ( )

Read Data of Node.

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

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

Referenced by __construct().

184  : void
185  {
186  $ilDB = $this->db;
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  }
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 141 of file class.ilSkillTreeNode.php.

Referenced by read().

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

Referenced by read().

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

◆ setId()

ilSkillTreeNode::setId ( int  $a_id)

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

Referenced by create().

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

◆ setImportId()

ilSkillTreeNode::setImportId ( string  $a_val)

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

Referenced by read().

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

◆ setOrderNr()

ilSkillTreeNode::setOrderNr ( int  $a_val)

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

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

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

◆ setSelfEvaluation()

ilSkillTreeNode::setSelfEvaluation ( bool  $a_val)

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

Referenced by read().

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

◆ setStatus()

ilSkillTreeNode::setStatus ( int  $a_val)

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

Referenced by read().

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

◆ setTitle()

ilSkillTreeNode::setTitle ( string  $a_title)

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

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

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

◆ setType()

ilSkillTreeNode::setType ( string  $a_type)

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

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

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

References $type, and _lookupType().

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

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

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

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

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


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