5 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
32 $this->db = $DIC->database();
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")
130 $sktr->setType($this->
getType());
149 $ilDB = $DIC->database();
151 $query =
"SELECT templ_id FROM skl_templ_ref WHERE skl_node_id = " .
152 $ilDB->quote($a_obj_id,
"integer");
154 $obj_rec =
$ilDB->fetchAssoc($obj_set);
156 return $obj_rec[
"templ_id"];
169 $ilDB = $DIC->database();
172 "SELECT * FROM skl_templ_ref " .
173 " WHERE templ_id = " .
$ilDB->quote($a_template_id,
"integer")
176 while ($rec =
$ilDB->fetchAssoc($set)) {
177 $trefs[] = $rec[
"skl_node_id"];
191 include_once(
"./Services/Skill/classes/class.ilSkillTree.php");
193 $top_template_id = $tree->getTopParentNodeId($a_tid);
194 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.
getDescription()
Get description.
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.
__construct(Container $dic, ilPlugin $plugin)
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.