5 include_once(
"./Services/Skill/interfaces/interface.ilSkillUsageInfo.php");
61 $this->base_skill_id = (int) $a_val;
81 $this->tref_id = (int) $a_val;
104 $set = $ilDB->query(
"SELECT * FROM skl_skill_resource ".
105 " WHERE base_skill_id = ".$ilDB->quote($this->getBaseSkillId(),
"integer").
106 " AND tref_id = ".$ilDB->quote($this->getTemplateRefId(),
"integer")
108 while ($rec = $ilDB->fetchAssoc($set))
110 if ($tree->isInTree($rec[
"rep_ref_id"]))
112 $this->resources[$rec[
"level_id"]][$rec[
"rep_ref_id"]] = array(
113 "level_id" => $rec[
"level_id"],
114 "rep_ref_id" => $rec[
"rep_ref_id"],
115 "trigger" => $rec[
"ltrigger"],
116 "imparting" => $rec[
"imparting"]
129 $ilDB->manipulate(
"DELETE FROM skl_skill_resource WHERE ".
130 " base_skill_id = ".$ilDB->quote((
int) $this->getBaseSkillId(),
"integer").
131 " AND tref_id = ".$ilDB->quote((
int) $this->getTemplateRefId(),
"integer")
137 if ($r[
"imparting"] || $r[
"trigger"])
139 $ilDB->manipulate(
"INSERT INTO skl_skill_resource ".
140 "(base_skill_id, tref_id, level_id, rep_ref_id, imparting, ltrigger) VALUES (".
141 $ilDB->quote((
int) $this->getBaseSkillId(),
"integer").
",".
142 $ilDB->quote((
int) $this->getTemplateRefId(),
"integer").
",".
143 $ilDB->quote((
int) $level_id,
"integer").
",".
144 $ilDB->quote((
int)
$ref_id,
"integer").
",".
145 $ilDB->quote((
int) $r[
"imparting"],
"integer").
",".
146 $ilDB->quote((
int) $r[
"trigger"],
"integer").
171 $ret = (is_array($this->resources[$a_level_id]))
172 ? $this->resources[$a_level_id]
187 if (!is_array($this->resources[$a_level_id]))
189 $this->resources[$a_level_id] = array();
191 if (!is_array($this->resources[$a_level_id][$a_rep_ref_id]))
193 $this->resources[$a_level_id][$a_rep_ref_id] = array();
196 $this->resources[$a_level_id][$a_rep_ref_id][
"trigger"] = $a_trigger;
208 if (!is_array($this->resources[$a_level_id]))
210 $this->resources[$a_level_id] = array();
212 if (!is_array($this->resources[$a_level_id][$a_rep_ref_id]))
214 $this->resources[$a_level_id][$a_rep_ref_id] = array();
217 $this->resources[$a_level_id][$a_rep_ref_id][
"imparting"] = $a_imparting;
230 include_once(
"./Services/Skill/classes/class.ilSkillUsage.php");
232 "skl_skill_resource",
"rep_ref_id",
"base_skill_id");