29 $set = $ilDB->query(
"SELECT *".
31 " WHERE parent = ".$ilDB->quote($a_parent_id,
"integer").
33 while(
$row = $ilDB->fetchAssoc($set))
36 $obj->importFromDB(
$row);
37 $res[$obj->getId()] = $obj;
55 $this->
id = (int)$a_id;
60 $this->
parent = ($a_value !== null)
72 $this->title = ($a_value !== null)
84 $this->pos = (int)$a_value;
99 $this->
setId($a_row[
"id"]);
121 $set = $ilDB->query(
"SELECT MAX(pos) pos".
122 " FROM exc_crit_cat".
123 " WHERE parent = ".$ilDB->quote($this->getParent(),
"integer"));
124 $row = $ilDB->fetchAssoc($set);
125 return (
int)
$row[
"pos"];
135 $set = $ilDB->query(
"SELECT *".
136 " FROM exc_crit_cat".
137 " WHERE id = ".$ilDB->quote($a_id,
"integer"));
138 if($ilDB->numRows($set))
140 $row = $ilDB->fetchAssoc($set);
155 $this->
id = $ilDB->nextId(
"exc_crit_cat");
160 $fields[
"id"] =
array(
"integer", $this->
id);
162 $ilDB->insert(
"exc_crit_cat", $fields);
171 return $this->
save();
174 $primary =
array(
"id"=>
array(
"integer", $this->
id));
178 public function delete()
187 include_once
"Modules/Exercise/classes/class.ilExcCriteria.php";
190 $ilDB->manipulate(
"DELETE FROM exc_crit_cat".
191 " WHERE id = ".$ilDB->quote($this->id,
"integer"));
198 if(!(
int)$a_parent_id)
203 $ilDB->manipulate(
"DELETE FROM exc_crit".
204 " WHERE parent = ".$ilDB->quote($a_parent_id,
"integer"));
209 $new_obj =
new self();
210 $new_obj->setParent($a_target_parent_id);
211 $new_obj->setTitle($this->
getTitle());
215 include_once
"Modules/Exercise/classes/class.ilExcCriteria.php";
218 $crit->cloneObject($new_obj->getId());
221 return $new_obj->getId();
Class ilExcCriteriaCatalogue.
static deleteByParent($a_parent_id)
cloneObject($a_target_parent_id)
static deleteByParent($a_parent_id)
static getInstancesByParentId($a_parent_id)
Create styles array
The data for the language used.
static getInstancesByParentId($a_parent_id)
importFromDB(array $a_row)