19 declare(strict_types=1);
27 string $direction =
"asc",
28 bool $sort_by_status =
false 31 =
"LEFT JOIN il_dcl_record_field AS sort_record_field_{$this->getId()} ON (sort_record_field_{$this->getId()}.record_id = record.id AND sort_record_field_{$this->getId()}.field_id = " 32 . $this->db->quote($this->
getId(),
'integer') .
") ";
33 $join_str .=
"LEFT JOIN il_dcl_stloc{$this->getStorageLocation()}_value AS sort_stloc_{$this->getId()} ON (sort_stloc_{$this->getId()}.record_field_id = sort_record_field_{$this->getId()}.id) ";
34 $join_str .=
"LEFT JOIN object_reference AS sort_object_reference_{$this->getId()} ON (sort_object_reference_{$this->getId()}.ref_id = sort_stloc_{$this->getId()}.value AND sort_object_reference_{$this->getId()}.deleted IS NULL)";
35 $join_str .=
"LEFT JOIN object_data AS sort_object_data_{$this->getId()} ON (sort_object_data_{$this->getId()}.obj_id = sort_object_reference_{$this->getId()}.obj_id)";
37 if ($sort_by_status) {
39 $ilUser = $DIC[
'ilUser'];
40 $join_str .=
"LEFT JOIN ut_lp_marks AS ut ON (ut.obj_id = sort_object_data_{$this->getId()}.obj_id AND ut.usr_id = " 41 . $this->db->quote($ilUser->getId(),
'integer') .
") ";
44 $select_str = (!$sort_by_status) ?
" sort_object_data_{$this->getId()}.title AS field_{$this->getId()}," :
" ut.status AS field_{$this->getId()}";
47 $sql_obj->setSelectStatement($select_str);
48 $sql_obj->setJoinStatement($join_str);
49 $sql_obj->setOrderStatement(
"field_{$this->getId()} " . $direction .
", ID ASC");
65 =
"INNER JOIN il_dcl_record_field AS filter_record_field_{$this->getId()} ON (filter_record_field_{$this->getId()}.record_id = record.id AND filter_record_field_{$this->getId()}.field_id = " 66 .
$ilDB->quote($this->
getId(),
'integer') .
") ";
67 $join_str .=
"INNER JOIN il_dcl_stloc{$this->getStorageLocation()}_value AS filter_stloc_{$this->getId()} ON (filter_stloc_{$this->getId()}.record_field_id = filter_record_field_{$this->getId()}.id) ";
68 $join_str .=
"INNER JOIN object_reference AS filter_object_reference_{$this->getId()} ON (filter_object_reference_{$this->getId()}.ref_id = filter_stloc_{$this->getId()}.value ) ";
69 $join_str .=
"INNER JOIN object_data AS filter_object_data_{$this->getId()} ON (filter_object_data_{$this->getId()}.obj_id = filter_object_reference_{$this->getId()}.obj_id AND filter_object_data_{$this->getId()}.title LIKE " 70 .
$ilDB->quote(
"%$filter_value%",
'text') .
") ";
73 $sql_obj->setJoinStatement($join_str);
getRecordQueryFilterObject( $filter_value="", ?ilDclBaseFieldModel $sort_field=null)
Returns a query-object for building the record-loader-sql-query.
getValidFieldProperties()
getRecordQuerySortObject(string $direction="asc", bool $sort_by_status=false)
Returns a query-object for building the record-loader-sql-query.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
const PROP_LEARNING_PROGRESS
const PROP_DISPLAY_COPY_LINK_ACTION_MENU
const PROP_ILIAS_REFERENCE_LINK