24 include_once
'./Services/Container/classes/class.ilContainer.php';
53 $this->obj_id = $a_obj_id;
63 $query =
"SELECT * FROM container_sorting_set ".
64 "WHERE obj_id = ".$ilDB->quote($a_obj_id ,
'integer').
" ";
69 return $row->sort_mode;
85 global $tree, $ilDB, $objDefinition;
88 $query =
"SELECT * FROM container_sorting_set ".
89 "WHERE obj_id = ".$ilDB->quote($a_obj_id ,
'integer').
" ";
96 return $row->sort_mode;
109 global $tree, $ilDB, $objDefinition;
120 if($cont_ref_id = $tree->checkForParentType(
$ref_id,
'grp'))
129 if($cont_ref_id = $tree->checkForParentType(
$ref_id,
'crs'))
168 $query =
"SELECT sort_mode FROM container_sorting_set ".
169 "WHERE obj_id = ".$ilDB->quote($a_old_id ,
'integer').
" ";
173 $query =
"DELETE FROM container_sorting_set ".
174 "WHERE obj_id = ".$ilDB->quote($a_new_id).
" ";
175 $ilDB->manipulate(
$query);
177 $query =
"INSERT INTO container_sorting_set (obj_id,sort_mode) ".
179 $ilDB->quote($a_new_id ,
'integer').
", ".
180 $ilDB->quote(
$row[0] ,
'integer').
" ".
182 $ilDB->manipulate(
$query);
195 return $this->sort_mode ? $this->sort_mode : 0;
207 $this->sort_mode = (int) $a_mode;
220 $query =
"DELETE FROM container_sorting_set ".
221 "WHERE obj_id = ".$ilDB->quote($this->obj_id,
'integer');
237 $query =
"INSERT INTO container_sorting_set (obj_id,sort_mode) ".
239 $this->db->quote($this->obj_id ,
'integer').
", ".
240 $this->db->quote($this->sort_mode ,
'integer').
" ".
249 public function delete()
253 $query =
'DELETE FROM container_sorting_set WHERE obj_id = '.$ilDB->quote($this->obj_id,
'integer');
271 $query =
"SELECT * FROM container_sorting_set ".
272 "WHERE obj_id = ".$this->db->quote($this->obj_id ,
'integer').
" ";
277 $this->sort_mode =
$row->sort_mode;
291 $lng->loadLanguageModule(
'crs');
295 return $lng->txt(
'crs_sort_activation');
298 return $lng->txt(
'crs_sort_manual');
301 return $lng->txt(
'crs_sort_title');