37 $this->db = $DIC->database();
39 $this->
setId($a_obj_id);
70 $this->skills =
array();
79 public function addSkill($a_skill_id, $a_tref_id)
81 $this->skills[$a_skill_id .
"-" . $a_tref_id] =
array(
82 "skill_id" => $a_skill_id,
83 "tref_id" => $a_tref_id
95 unset($this->skills[$a_skill_id .
"-" . $a_tref_id]);
117 include_once(
"./Services/Skill/classes/class.ilVirtualSkillTree.php");
119 return $vtree->getOrderedNodeset($this->
getSkills(),
"skill_id",
"tref_id");
130 $this->skills =
array();
131 $set =
$db->query(
"SELECT * FROM cont_skills " .
132 " WHERE id = " .
$db->quote($this->getId(),
"integer"));
133 while ($rec =
$db->fetchAssoc($set)) {
134 $this->skills[$rec[
"skill_id"] .
"-" . $rec[
"tref_id"]] = $rec;
141 public function delete()
145 $db->manipulate(
"DELETE FROM cont_skills WHERE " .
146 " id = " .
$db->quote($this->getId(),
"integer"));
157 foreach ($this->skills as
$s) {
158 $db->manipulate(
"INSERT INTO cont_skills " .
159 "(id, skill_id, tref_id) VALUES (" .
160 $db->quote($this->getId(),
"integer") .
"," .
161 $db->quote($s[
"skill_id"],
"integer") .
"," .
162 $db->quote($s[
"tref_id"],
"integer") .
")");
addSkill($a_skill_id, $a_tref_id)
Add skill.
resetSkills()
Reset skills.
__construct($a_obj_id)
Constrictor.
getOrderedSkills()
Get odered skills.
removeSkill($a_skill_id, $a_tref_id)
Remove skill.
Create styles array
The data for the language used.