5 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
32 $this->db = $DIC->database();
33 parent::__construct($a_id);
44 $this->skill_template_id = $a_val;
54 return $this->skill_template_id;
67 "SELECT * FROM skl_templ_ref " .
68 " WHERE skl_node_id = " .
$ilDB->quote($this->getId(),
"integer")
70 $rec =
$ilDB->fetchAssoc($set);
83 $ilDB->manipulate(
"INSERT INTO skl_templ_ref " .
84 "(skl_node_id, templ_id) VALUES (" .
85 $ilDB->quote($this->getId(),
"integer") .
"," .
86 $ilDB->quote($this->getSkillTemplateId(),
"integer") .
100 "UPDATE skl_templ_ref SET " .
101 " templ_id = " .
$ilDB->quote($this->getSkillTemplateId(),
"integer") .
102 " WHERE skl_node_id = " .
$ilDB->quote($this->getId(),
"integer")
110 public function delete()
115 "DELETE FROM skl_templ_ref WHERE " 116 .
" skl_node_id = " .
$ilDB->quote($this->getId(),
"integer")
129 $sktr->setType($this->
getType());
148 $ilDB = $DIC->database();
150 $query =
"SELECT templ_id FROM skl_templ_ref WHERE skl_node_id = " .
151 $ilDB->quote($a_obj_id,
"integer");
153 $obj_rec =
$ilDB->fetchAssoc($obj_set);
155 return $obj_rec[
"templ_id"];
168 $ilDB = $DIC->database();
171 "SELECT * FROM skl_templ_ref " .
172 " WHERE templ_id = " .
$ilDB->quote($a_template_id,
"integer")
175 while ($rec =
$ilDB->fetchAssoc($set)) {
176 $trefs[] = $rec[
"skl_node_id"];
190 include_once(
"./Services/Skill/classes/class.ilSkillTree.php");
192 $top_template_id = $tree->getTopParentNodeId($a_tid);
193 return self::_lookupTrefIdsForTopTemplateId($top_template_id);
__construct($a_id=0)
Constructor public.
setSkillTemplateId($a_val)
Set skill template id.
setType($a_type)
Set type.
getSkillTemplateId()
Get skill template id.
Skill Template Reference.
static _lookupTrefIdsForTemplateId($a_tid)
Get all tref ids for a template id.
copy()
Copy basic skill template.
getSelfEvaluation()
Get self evaluation.
getOrderNr()
Get order nr.
static _lookupTemplateId($a_obj_id)
Lookup template ID.
Create styles array
The data for the language used.
update($pash, $contents, Config $config)
static _lookupTrefIdsForTopTemplateId($a_template_id)
Lookup tref ids for template id.
A node in the skill tree.
create()
Create skill template reference.
read()
Read data from database.