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

Skill Template Reference. More...

+ Inheritance diagram for ilSkillTemplateReference:
+ Collaboration diagram for ilSkillTemplateReference:

Public Member Functions

 __construct ($a_id=0)
 Constructor @access public. More...
 
 setSkillTemplateId ($a_val)
 Set skill template id. More...
 
 getSkillTemplateId ()
 Get skill template id. More...
 
 read ()
 Read data from database. More...
 
 create ()
 Create skill template reference. More...
 
 update ()
 Update node. More...
 
 delete ()
 Delete skill. More...
 
 copy ()
 Copy basic skill template. More...
 
- 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...
 

Static Public Member Functions

static _lookupTemplateId ($a_obj_id)
 Lookup template ID. More...
 
static _lookupTrefIdsForTopTemplateId ($a_template_id)
 Lookup tref ids for template id. More...
 
static _lookupTrefIdsForTemplateId ($a_tid)
 Get all tref ids for a template id. More...
 
- 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...
 

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
 

Protected Attributes

 $db
 
- Protected Attributes inherited from ilSkillTreeNode
 $db
 

Additional Inherited Members

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

Detailed Description

Skill Template Reference.

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.ilSkillTemplateReference.php.

Constructor & Destructor Documentation

◆ __construct()

ilSkillTemplateReference::__construct (   $a_id = 0)

Constructor @access public.

Reimplemented from ilSkillTreeNode.

Definition at line 23 of file class.ilSkillTemplateReference.php.

24 {
25 global $DIC;
26
27 $this->db = $DIC->database();
29 $this->setType("sktr");
30 }
setType($a_type)
Set type.
global $DIC
Definition: goto.php:24
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

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

+ Here is the call graph for this function:

Member Function Documentation

◆ _lookupTemplateId()

static ilSkillTemplateReference::_lookupTemplateId (   $a_obj_id)
static

Lookup template ID.

Parameters
intnode ID
Returns
string template ID

Definition at line 141 of file class.ilSkillTemplateReference.php.

142 {
143 global $DIC;
144
145 $ilDB = $DIC->database();
146
147 $query = "SELECT templ_id FROM skl_templ_ref WHERE skl_node_id = " .
148 $ilDB->quote($a_obj_id, "integer");
149 $obj_set = $ilDB->query($query);
150 $obj_rec = $ilDB->fetchAssoc($obj_set);
151
152 return $obj_rec["templ_id"];
153 }
$query
global $ilDB

References $DIC, $ilDB, and $query.

Referenced by ilSkillTreeNode\_lookupTitle(), ilPersonalSkillsGUI\assignMaterials(), ilSurveySkillExplorer\buildTitle(), ilCOPageHTMLExport\collectPageElements(), ilObjSkillManagementGUI\deleteNodes(), ilSkillCatTableGUI\fillRow(), ilSkillTreeNode\findSkills(), ilSkillTreeNode\getAllCSkillIdsForNodeIds(), ilVirtualSkillTree\getChildsOfNode(), ilSkillTreeNode\getIconPath(), ilVirtualSkillTree\getNode(), ilSkillTemplateTreeExplorerGUI\getNodeContent(), ilSkillTreeExplorerGUI\getNodeContent(), ilSkillTree\getSkillTreePath(), ilPersonalSkill\getUsageInfo(), ilPersonalSkillsGUI\renderSkillHTML(), ilPersonalSkillsGUI\selfEvaluation(), and ilSkillTemplateReferenceGUI\setTabs().

+ Here is the caller graph for this function:

◆ _lookupTrefIdsForTemplateId()

static ilSkillTemplateReference::_lookupTrefIdsForTemplateId (   $a_tid)
static

Get all tref ids for a template id.

Parameters
int$a_tidtemplate node id (node id in template tree)
Returns
array of ids

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

186 {
187 $tree = new ilSkillTree();
188 $top_template_id = $tree->getTopParentNodeId($a_tid);
189 return self::_lookupTrefIdsForTopTemplateId($top_template_id);
190 }
static _lookupTrefIdsForTopTemplateId($a_template_id)
Lookup tref ids for template id.

References _lookupTrefIdsForTopTemplateId().

Referenced by ilObjSkillManagementGUI\deleteNodes(), ilSkillTreeNode\getAllCSkillIdsForNodeIds(), and ilSkillUsage\getAllUsagesOfTemplate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _lookupTrefIdsForTopTemplateId()

static ilSkillTemplateReference::_lookupTrefIdsForTopTemplateId (   $a_template_id)
static

Lookup tref ids for template id.

Parameters
$a_template_id(top) template node id
Returns
array array of integer tref ids

Definition at line 161 of file class.ilSkillTemplateReference.php.

162 {
163 global $DIC;
164
165 $ilDB = $DIC->database();
166
167 $set = $ilDB->query(
168 "SELECT * FROM skl_templ_ref " .
169 " WHERE templ_id = " . $ilDB->quote($a_template_id, "integer")
170 );
171 $trefs = array();
172 while ($rec = $ilDB->fetchAssoc($set)) {
173 $trefs[] = $rec["skl_node_id"];
174 }
175 return $trefs;
176 }

References $DIC, and $ilDB.

Referenced by _lookupTrefIdsForTemplateId(), ilBasicSkillTemplate\delete(), ilSkillTemplateCategory\delete(), ilObjSkillManagementGUI\deleteNodes(), and ilSkillTreeNode\findSkills().

+ Here is the caller graph for this function:

◆ copy()

ilSkillTemplateReference::copy ( )

Copy basic skill template.

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

122 {
123 $sktr = new ilSkillTemplateReference();
124 $sktr->setTitle($this->getTitle());
125 $sktr->setDescription($this->getDescription());
126 $sktr->setType($this->getType());
127 $sktr->setSkillTemplateId($this->getSkillTemplateId());
128 $sktr->setSelfEvaluation($this->getSelfEvaluation());
129 $sktr->setOrderNr($this->getOrderNr());
130 $sktr->create();
131
132 return $sktr;
133 }
getSkillTemplateId()
Get skill template id.
getDescription()
Get description.
getOrderNr()
Get order nr.
getSelfEvaluation()
Get self evaluation.

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

+ Here is the call graph for this function:

◆ create()

ilSkillTemplateReference::create ( )

Create skill template reference.

Reimplemented from ilSkillTreeNode.

Definition at line 73 of file class.ilSkillTemplateReference.php.

74 {
76
77 parent::create();
78
79 $ilDB->manipulate("INSERT INTO skl_templ_ref " .
80 "(skl_node_id, templ_id) VALUES (" .
81 $ilDB->quote($this->getId(), "integer") . "," .
82 $ilDB->quote($this->getSkillTemplateId(), "integer") .
83 ")");
84 }

References $db, and $ilDB.

◆ delete()

ilSkillTemplateReference::delete ( )

Delete skill.

Reimplemented from ilSkillTreeNode.

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

107 {
109
110 $ilDB->manipulate(
111 "DELETE FROM skl_templ_ref WHERE "
112 . " skl_node_id = " . $ilDB->quote($this->getId(), "integer")
113 );
114
115 parent::delete();
116 }

References $db, and $ilDB.

◆ getSkillTemplateId()

ilSkillTemplateReference::getSkillTemplateId ( )

Get skill template id.

Returns
int skill template id

Definition at line 47 of file class.ilSkillTemplateReference.php.

48 {
49 return $this->skill_template_id;
50 }

Referenced by copy().

+ Here is the caller graph for this function:

◆ read()

ilSkillTemplateReference::read ( )

Read data from database.

Reimplemented from ilSkillTreeNode.

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

56 {
58
59 parent::read();
60
61 $set = $ilDB->query(
62 "SELECT * FROM skl_templ_ref " .
63 " WHERE skl_node_id = " . $ilDB->quote($this->getId(), "integer")
64 );
65 if ($rec = $ilDB->fetchAssoc($set)) {
66 $this->setSkillTemplateId((int) $rec["templ_id"]);
67 }
68 }
setSkillTemplateId($a_val)
Set skill template id.

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

+ Here is the call graph for this function:

◆ setSkillTemplateId()

ilSkillTemplateReference::setSkillTemplateId (   $a_val)

Set skill template id.

Parameters
int$a_valskill template id

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

38 {
39 $this->skill_template_id = $a_val;
40 }

Referenced by read().

+ Here is the caller graph for this function:

◆ update()

ilSkillTemplateReference::update ( )

Update node.

Reimplemented from ilSkillTreeNode.

Definition at line 89 of file class.ilSkillTemplateReference.php.

90 {
92
93 parent::update();
94
95 $ilDB->manipulate(
96 "UPDATE skl_templ_ref SET " .
97 " templ_id = " . $ilDB->quote($this->getSkillTemplateId(), "integer") .
98 " WHERE skl_node_id = " . $ilDB->quote($this->getId(), "integer")
99 );
100 }

References $db, and $ilDB.

Field Documentation

◆ $db

ilSkillTemplateReference::$db
protected

Definition at line 15 of file class.ilSkillTemplateReference.php.

Referenced by create(), delete(), read(), and update().

◆ $id

ilSkillTemplateReference::$id

Definition at line 17 of file class.ilSkillTemplateReference.php.


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