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;
119 if($course_ref_id = $tree->checkForParentType(
$ref_id,
'crs'))
124 $query =
"SELECT * FROM container_sorting_set ".
125 "WHERE obj_id = ".$ilDB->quote($a_obj_id ,
'integer').
" ";
130 return $row->sort_mode;
162 $query =
"SELECT sort_mode FROM container_sorting_set ".
163 "WHERE obj_id = ".$ilDB->quote($a_old_id ,
'integer').
" ";
167 $query =
"DELETE FROM container_sorting_set ".
168 "WHERE obj_id = ".$ilDB->quote($a_new_id).
" ";
169 $ilDB->manipulate(
$query);
171 $query =
"INSERT INTO container_sorting_set (obj_id,sort_mode) ".
173 $ilDB->quote($a_new_id ,
'integer').
", ".
174 $ilDB->quote(
$row[0] ,
'integer').
" ".
176 $ilDB->manipulate(
$query);
189 return $this->sort_mode ? $this->sort_mode : 0;
201 $this->sort_mode = (int) $a_mode;
214 $query =
"DELETE FROM container_sorting_set ".
215 "WHERE obj_id = ".$ilDB->quote($this->obj_id,
'integer');
231 $query =
"INSERT INTO container_sorting_set (obj_id,sort_mode) ".
233 $this->db->quote($this->obj_id ,
'integer').
", ".
234 $this->db->quote($this->sort_mode ,
'integer').
" ".
243 public function delete()
247 $query =
'DELETE FROM container_sorting_set WHERE obj_id = '.$ilDB->quote($this->obj_id,
'integer');
265 $query =
"SELECT * FROM container_sorting_set ".
266 "WHERE obj_id = ".$this->db->quote($this->obj_id ,
'integer').
" ";
271 $this->sort_mode =
$row->sort_mode;
284 $lng->loadLanguageModule(
'crs');
288 return $lng->txt(
'crs_sort_activation');
291 return $lng->txt(
'crs_sort_manual');
294 return $lng->txt(
'crs_sort_title');