ILIAS  release_7 Revision v7.30-3-g800a261c036
ilSkillTemplateCategory Class Reference

Skill Template Category. More...

+ Inheritance diagram for ilSkillTemplateCategory:
+ Collaboration diagram for ilSkillTemplateCategory:

Public Member Functions

 __construct ($a_id=0)
 Constructor public. More...
 
 copy ()
 Copy skill category. More...
 
 delete ()
 
- Public Member Functions inherited from ilSkillTreeNode
 __construct ($a_id=0)
 
 setTitle ($a_title)
 Set title. More...
 
 getTitle ()
 Get title. More...
 
 setDescription ($a_description)
 Set description. More...
 
 getDescription ()
 Get description. More...
 
 setType ($a_type)
 Set type. More...
 
 getType ()
 Get type. More...
 
 setId ($a_id)
 Set Node ID. More...
 
 getId ()
 Get Node ID. More...
 
 setSelfEvaluation ($a_val)
 Set self evaluation. More...
 
 getSelfEvaluation ()
 Get self evaluation. More...
 
 setOrderNr ($a_val)
 Set order nr. More...
 
 getOrderNr ()
 Get order nr. More...
 
 setImportId ($a_val)
 Set import id. More...
 
 getImportId ()
 Get import id. More...
 
 getCreationDate ()
 Get creation date. More...
 
 read ()
 Read Data of Node. More...
 
 setDataRecord ($a_record)
 this method should only be called by class ilSCORM2004NodeFactory More...
 
 setStatus ($a_val)
 Set status. More...
 
 getStatus ()
 Get status. More...
 
 create ()
 Create Node. More...
 
 update ()
 Update Node. More...
 
 delete ()
 Delete Node. More...
 

Data Fields

 $id
 
- Data Fields inherited from ilSkillTreeNode
 $skill_tree
 
const STATUS_PUBLISH = 0
 
const STATUS_DRAFT = 1
 
const STATUS_OUTDATED = 2
 
 $type
 
 $id
 
 $title
 
 $description
 

Additional Inherited Members

- Static Public Member Functions inherited from ilSkillTreeNode
static getAllStatus ()
 Get all status. More...
 
static getStatusInfo ($a_status)
 Get status info. More...
 
static _lookupTitle ($a_obj_id, $a_tref_id=0)
 Lookup Title. More...
 
static _lookupDescription ($a_obj_id)
 Lookup Description. More...
 
static _lookupSelfEvaluation ($a_obj_id)
 Lookup self evaluation. More...
 
static _lookupStatus ($a_obj_id)
 Lookup Status. More...
 
static _lookupType ($a_obj_id)
 Lookup Type. More...
 
static _writeTitle ($a_obj_id, $a_title)
 Write Title. More...
 
static _writeDescription ($a_obj_id, $a_description)
 Write Description. More...
 
static _writeOrderNr ($a_obj_id, $a_nr)
 Write Order Nr. More...
 
static putInTree ($a_obj, $a_parent_id="", $a_target_node_id="")
 Put this object into the skill tree. More...
 
static getTree ($a_slm_obj_id)
 Get scorm module editing tree. More...
 
static uniqueTypesCheck ($a_items)
 Check for unique types. More...
 
static clipboardCut ($a_tree_id, $a_ids)
 Cut and copy a set of skills/skill categories into the clipboard. More...
 
static clipboardCopy ($a_tree_id, $a_ids)
 Copy a set of skills/skill categories into the clipboard. More...
 
static insertItemsFromClip ($a_type, $a_obj_id)
 Insert basic skills from clipboard. More...
 
static clearClipboard ()
 Remove all skill items from clipboard. More...
 
static pasteTree ( $a_item_id, $a_parent_id, $a_target, $a_insert_time, &$a_copied_nodes, $a_as_copy=false, $a_add_suffix=false)
 Paste item (tree) from clipboard to skill tree. More...
 
static isInTree ($a_id)
 Is id in tree? More...
 
static getAllSelfEvaluationNodes ()
 Get all self evaluation nodes. More...
 
static getTopTemplates ()
 Get top skill templates and template categories. More...
 
static getSelectableSkills ()
 Get selectable skills. More...
 
static saveChildsOrder ($a_par_id, $a_childs_order, $a_templates=false)
 Save childs order. More...
 
static getIconPath ($a_obj_id, $a_type, $a_size="", $a_status=0)
 Get icon path. More...
 
static findSkills ($a_term)
 Find skills. More...
 
static getAllCSkillIdsForNodeIds (array $a_node_ids)
 Get all possible common skill IDs for node IDs. More...
 
- Protected Member Functions inherited from ilSkillTreeNode
 setCreationDate ($a_val)
 Set creation date. More...
 
- Static Protected Member Functions inherited from ilSkillTreeNode
static _lookup ($a_obj_id, $a_field)
 Lookup Title. More...
 
- Protected Attributes inherited from ilSkillTreeNode
 $db
 

Detailed Description

Skill Template Category.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e

Definition at line 10 of file class.ilSkillTemplateCategory.php.

Constructor & Destructor Documentation

◆ __construct()

ilSkillTemplateCategory::__construct (   $a_id = 0)

Constructor public.

Definition at line 18 of file class.ilSkillTemplateCategory.php.

References ILIAS\GlobalScreen\Provider\__construct(), and ilSkillTreeNode\setType().

19  {
20  parent::__construct($a_id);
21  $this->setType("sctp");
22  }
setType($a_type)
Set type.
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ copy()

ilSkillTemplateCategory::copy ( )

Copy skill category.

Definition at line 27 of file class.ilSkillTemplateCategory.php.

References ilSkillTreeNode\getDescription(), ilSkillTreeNode\getOrderNr(), ilSkillTreeNode\getTitle(), and ilSkillTreeNode\getType().

28  {
29  $sctp = new ilSkillTemplateCategory();
30  $sctp->setTitle($this->getTitle());
31  $sctp->setDescription($this->getDescription());
32  $sctp->setType($this->getType());
33  $sctp->setOrderNr($this->getOrderNr());
34  $sctp->create();
35 
36  return $sctp;
37  }
getDescription()
Get description.
getOrderNr()
Get order nr.
+ Here is the call graph for this function:

◆ delete()

ilSkillTemplateCategory::delete ( )

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

References ilSkillTreeNode\$db, $ilDB, ilSkillTemplateReference\_lookupTrefIdsForTopTemplateId(), ilSkillTreeNode\getId(), and ilSkillTreeNodeFactory\getInstance().

40  {
41  $ilDB = $this->db;
42 
43  $sctp_id = $this->getId();
44  $childs = $this->skill_tree->getChildsByTypeFilter(
45  $sctp_id,
46  ["sktp", "sctp"]
47  );
48  foreach ($childs as $node) {
49  switch ($node["type"]) {
50  case "sktp":
51  $obj = new ilBasicSkillTemplate((int) $node["obj_id"]);
52  $obj->delete();
53  break;
54 
55  case "sctp":
56  $obj = new ilSkillTemplateCategory((int) $node["obj_id"]);
57  $obj->delete();
58  break;
59  }
60  }
61 
62  foreach (\ilSkillTemplateReference::_lookupTrefIdsForTopTemplateId($sctp_id) as $tref_id) {
63  $obj = ilSkillTreeNodeFactory::getInstance($tref_id);
64  $node_data = $this->skill_tree->getNodeData($tref_id);
65  if (is_object($obj)) {
66  $obj->delete();
67  }
68  if ($this->skill_tree->isInTree($tref_id)) {
69  $this->skill_tree->deleteTree($node_data);
70  }
71  }
72 
73  $ilDB->manipulate(
74  "DELETE FROM skl_templ_ref WHERE "
75  . " templ_id = " . $ilDB->quote($this->getId(), "integer")
76  );
77 
78  parent::delete();
79  }
static _lookupTrefIdsForTopTemplateId($a_template_id)
Lookup tref ids for template id.
global $ilDB
+ Here is the call graph for this function:

Field Documentation

◆ $id

ilSkillTemplateCategory::$id

Definition at line 12 of file class.ilSkillTemplateCategory.php.


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