ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
Tracking query class. More...
Static Public Member Functions | |
static | getObjectsStatusForUser ($a_user_id, array $obj_refs) |
static | getObjectivesStatusForUser ($a_user_id, $a_obj_id, array $a_objective_ids) |
static | getSCOsStatusForUser ($a_user_id, $a_parent_obj_id, array $a_sco_ids) |
static | getSubItemsStatusForUser ($a_user_id, $a_parent_obj_id, array $a_item_ids) |
Get subitems status. More... | |
static | getUserDataForObject ( $a_ref_id, $a_order_field="", $a_order_dir="", $a_offset=0, $a_limit=9999, array $a_filters=null, array $a_additional_fields=null, $check_agreement=false, $privacy_fields=null) |
Get all user-based tracking data for object. More... | |
static | getObjectsDataForUser ( $a_user_id, $a_parent_obj_id, $a_parent_ref_id, $a_order_field="", $a_order_dir="", $a_offset=0, $a_limit=9999, array $a_filters=null, array $a_additional_fields=null, $use_collection=true) |
Get all object-based tracking data for user and parent object. More... | |
static | getSubItemType ($a_parent_obj_id) |
Get sub-item object type for parent. More... | |
static | getObjectsSummaryForObject ( $a_parent_obj_id, $a_parent_ref_id, $a_order_field="", $a_order_dir="", $a_offset=0, $a_limit=9999, array $a_filters=null, array $a_additional_fields=null, $a_preselected_obj_ids=null) |
Get all aggregated tracking data for parent object. More... | |
static | getParticipantsForObject ($a_ref_id) |
Get participant ids for given object. More... | |
static | getObjectIds ($a_parent_obj_id, $a_parent_ref_id=false, $use_collection=true, $a_refresh_status=true, $a_user_ids=null) |
Get (sub)objects for given object, also handles learning objectives (course only) More... | |
static | executeQueries (array $queries, $a_order_field="", $a_order_dir="", $a_offset=0, $a_limit=9999) |
Execute given queries, including count query. More... | |
static | getUserObjectMatrix ( $a_parent_ref_id, $a_obj_ids, $a_user_filter=null, array $a_additional_fields=null, array $a_privacy_fields=null, $a_check_agreement=null) |
Get status matrix for users on objects. More... | |
static | getUserObjectiveMatrix ($a_parent_obj_id, $a_users) |
static | getObjectAccessStatistics (array $a_ref_ids, $a_year, $a_month=null) |
static | getObjectTypeStatistics () |
static | getWorkspaceBlogs ($a_title=null) |
static | getPortfolios ($a_title=null) |
static | getObjectDailyStatistics (array $a_ref_ids, $a_year, $a_month=null) |
static | getObjectStatisticsMonthlySummary () |
static | deleteObjectStatistics (array $a_months) |
static | searchObjects ($a_type, $a_title=null, $a_root=null, $a_hidden=null, $a_preset_obj_ids=null) |
static | getObjectStatisticsLogInfo () |
Get last update info for object statistics. More... | |
static | getObjectLPStatistics (array $a_obj_ids, $a_year, $a_month=null, $a_group_by_day=false) |
static | getObjectTypeStatisticsPerMonth ($a_aggregation, $a_year=null) |
Static Protected Member Functions | |
static | getUDFAndHandlePrivacy (array &$a_result, array $a_udf=null, $a_check_agreement=null, array $a_privacy_fields=null, array $a_filters=null) |
Handle privacy and add udf data to (user) result data. More... | |
static | getSessionData ($a_user_id, array $obj_ids) |
Get session data for given objects and user. More... | |
static | getSummaryDataForObject ($a_ref_id, array $fields, array $a_filters=null) |
Get all aggregated tracking data for object. More... | |
static | getSummaryPercentages ($field, $base_query, $alias=null) |
Get aggregated data for field. More... | |
static | buildFilters (array $where, array $a_filters=null, $a_aggregate=false) |
Build sql from filter definition. More... | |
static | buildColumns (array &$a_fields, array $a_additional_fields=null, $a_aggregate=false) |
Build sql from field definition. More... | |
static | getSubTree ($a_parent_ref_id, array &$a_object_ids, array &$a_ref_ids) |
Get complete branch of tree (recursively) More... | |
static | refreshObjectsStatus (array $a_obj_ids, $a_users=null) |
check whether status (for all relevant users) exists More... | |
Tracking query class.
Put any complex queries into this class. Keep tracking class small.
Definition at line 12 of file class.ilTrQuery.php.
|
staticprotected |
Build sql from field definition.
array | &$a_fields | |
array | $a_additional_fields | |
bool | $a_aggregate |
Definition at line 1089 of file class.ilTrQuery.php.
References $function, and array.
|
staticprotected |
Build sql from filter definition.
array | $where | |
array | $a_filters | |
bool | $a_aggregate |
Definition at line 913 of file class.ilTrQuery.php.
References $id, $ilDB, array, IL_CAL_DATETIME, IL_CAL_UNIX, and ilLPStatus\LP_STATUS_NOT_ATTEMPTED_NUM.
|
static |
Definition at line 1699 of file class.ilTrQuery.php.
References $from, $ilDB, $table, and array.
Referenced by ilLPObjectStatisticsGUI\deleteData().
|
static |
|
static |
Definition at line 1515 of file class.ilTrQuery.php.
References $column, $ilDB, $res, $row, and array.
Referenced by ilLPObjectStatisticsTableGUI\getItems().
|
static |
Definition at line 1657 of file class.ilTrQuery.php.
References $ilDB, $res, $row, and array.
Referenced by ilLPObjectStatisticsDailyTableGUI\getItems().
|
static |
Get (sub)objects for given object, also handles learning objectives (course only)
int | $a_parent_obj_id | |
int | $a_parent_ref_id | |
int | $use_collection | |
bool | $a_refresh_status | |
array | $a_user_ids |
Definition at line 1176 of file class.ilTrQuery.php.
References ilLPStatusFactory\_getInstance(), ilObject\_lookupObjId(), ilObject\_lookupType(), array, ilObjectLP\getInstance(), ilLPObjSettings\LP_MODE_COLLECTION_MANUAL, ilLPObjSettings\LP_MODE_COLLECTION_MOBS, ilLPObjSettings\LP_MODE_COLLECTION_TLT, ilLPObjSettings\LP_MODE_OBJECTIVES, and ilLPObjSettings\LP_MODE_SCORM.
Referenced by ilTrMatrixTableGUI\getItems().
|
static |
Definition at line 83 of file class.ilTrQuery.php.
References $ilDB, $query, $result, array, ilLOUserResults\getObjectiveStatusForLP(), and ilLPStatus\LP_STATUS_NOT_ATTEMPTED_NUM.
Referenced by ilLPProgressTableGUI\getItems().
|
static |
Definition at line 1806 of file class.ilTrQuery.php.
References $column, $ilDB, $res, $row, and array.
Referenced by ilLPObjectStatisticsLPTableGUI\getDetailItems(), and ilLPObjectStatisticsLPTableGUI\getItems().
|
static |
Get all object-based tracking data for user and parent object.
int | $a_user_id | |
int | $a_parent_obj_id | |
int | $a_parent_ref_id | |
string | $a_order_field | |
string | $a_order_dir | |
int | $a_offset | |
int | $a_limit | |
array | $a_filters | |
array | $a_additional_fields | |
bool | $use_collection |
Definition at line 412 of file class.ilTrQuery.php.
References $ilDB, $query, $result, $row, $session, $time, ilCourseObjective\_getObjectiveIds(), ilObjSAHSLearningModule\_lookupSubType(), array, IL_CAL_DATETIME, IL_CAL_UNIX, ilLPStatus\LP_STATUS_COMPLETED_NUM, ilLPStatus\LP_STATUS_FAILED_NUM, ilLPStatus\LP_STATUS_IN_PROGRESS_NUM, and ilLPStatus\LP_STATUS_NOT_ATTEMPTED_NUM.
Referenced by ilTrUserObjectsPropsTableGUI\getItems().
|
static |
Definition at line 14 of file class.ilTrQuery.php.
References $ilDB, $query, $result, $session, array, ilObjectLP\getInstance(), IL_CRS_VIEW_OBJECTIVE, ilLPObjSettings\LP_MODE_OBJECTIVES, and ilLPStatus\LP_STATUS_NOT_ATTEMPTED_NUM.
Referenced by ilPortfolioPageGUI\getCoursesOfUser(), and ilLPProgressTableGUI\getItems().
|
static |
Get all aggregated tracking data for parent object.
:TODO: sorting, offset, limit, objectives, collection/all
int | $a_parent_obj_id | |
int | $a_parent_ref_id | |
string | $a_order_field | |
string | $a_order_dir | |
int | $a_offset | |
int | $a_limit | |
array | $a_filter | |
array | $a_additional_fields | |
array | $a_preselected_obj_ids |
Definition at line 613 of file class.ilTrQuery.php.
References $ilDB, $result, and array.
Referenced by ilTrSummaryTableGUI\getItems().
|
static |
Get last update info for object statistics.
Definition at line 1797 of file class.ilTrQuery.php.
References $ilDB.
Referenced by ilLPObjectStatisticsGUI\showAggregationInfo().
|
static |
Definition at line 1683 of file class.ilTrQuery.php.
References $ilDB, $res, $row, and array.
Referenced by ilLPObjectStatisticsAdminTableGUI\getItems().
|
static |
Definition at line 1564 of file class.ilTrQuery.php.
References $ilDB, $res, $row, $type, array, and ilObjectDefinition\MODE_REPOSITORY.
Referenced by ilLPCronObjectStatistics\gatherTypesData(), and ilLPObjectStatisticsTypesTableGUI\getItems().
|
static |
Definition at line 1838 of file class.ilTrQuery.php.
References $ilDB, $res, $row, array, and date.
Referenced by ilLPObjectStatisticsTypesTableGUI\getItems().
|
static |
Get participant ids for given object.
int | $a_ref_id |
Definition at line 784 of file class.ilTrQuery.php.
References $GLOBALS, $path, $type, ilLPStatusFactory\_getClassById(), ilObjSCORMTracking\_getTrackedUsers(), ilObject\_lookupObjectId(), ilObjSAHSLearningModule\_lookupSubType(), ilObject\_lookupType(), array, ilParticipants\getInstance(), ilLPObjSettings\LP_MODE_SURVEY_FINISHED, and ilLPObjSettings\LP_MODE_TEST_FINISHED.
Referenced by ilSCORMTrackingItemsPerUserFilterGUI\parse(), ilSCORM2004TrackingItemsPerUserFilterGUI\parse(), ilObjSCORMLearningModuleGUI\showTrackingItems(), ilObjSCORM2004LearningModuleGUI\showTrackingItems(), ilObjSCORMLearningModuleGUI\showTrackingItemsBySco(), and ilObjSCORM2004LearningModuleGUI\showTrackingItemsBySco().
|
static |
Definition at line 1635 of file class.ilTrQuery.php.
References $ilDB, $res, $row, and array.
Referenced by ilLPObjectStatisticsDailyTableGUI\getItems(), and ilLPObjectStatisticsTableGUI\getItems().
|
static |
Definition at line 109 of file class.ilTrQuery.php.
References $module, ilLPStatusWrapper\_getStatusInfo(), ilObjSAHSLearningModule\_lookupSubType(), array, ilLPStatus\LP_STATUS_COMPLETED, ilLPStatus\LP_STATUS_FAILED, ilLPStatus\LP_STATUS_IN_PROGRESS, and ilLPStatus\LP_STATUS_NOT_ATTEMPTED.
Referenced by ilLPProgressTableGUI\getItems().
|
staticprotected |
Get session data for given objects and user.
int | $a_user_id | |
array | $obj_ids |
Definition at line 566 of file class.ilTrQuery.php.
References $ilDB, $query, array, ilDatePresentation\formatPeriod(), and IL_CAL_DATETIME.
|
static |
Get subitems status.
type | $a_user_id | |
type | $a_parent_obj_id | |
array | $a_item_ids |
Definition at line 174 of file class.ilTrQuery.php.
References ilObject\_getAllReferences(), ilLPStatusWrapper\_getStatusInfo(), ilObject\_lookupType(), array, ilObjectLP\getInstance(), ilLPStatus\LP_STATUS_COMPLETED, ilLPStatus\LP_STATUS_IN_PROGRESS, and ilLPStatus\LP_STATUS_NOT_ATTEMPTED.
Referenced by ilLPProgressTableGUI\getItems().
|
static |
Get sub-item object type for parent.
int | $a_parent_obj_id |
Definition at line 548 of file class.ilTrQuery.php.
References ilObject\_lookupType().
Referenced by ilTrMatrixTableGUI\getSelectableColumns().
|
staticprotected |
Get complete branch of tree (recursively)
int | $a_parent_ref_id | |
array | $a_object_ids | |
array | $a_ref_ids |
Definition at line 1252 of file class.ilTrQuery.php.
References ilObjectLP\getInstance(), and ilLPObjSettings\LP_MODE_UNDEFINED.
|
staticprotected |
Get all aggregated tracking data for object.
int | $a_ref_id | |
array | $fields | |
array | $a_filters |
Definition at line 678 of file class.ilTrQuery.php.
References $ilDB, $query, $result, $valid, ilObject\_lookupObjectId(), and array.
|
staticprotected |
Get aggregated data for field.
string | $field | |
string | $base_query | |
string | $alias |
Definition at line 751 of file class.ilTrQuery.php.
References $ilDB, $query, $result, and array.
|
staticprotected |
Handle privacy and add udf data to (user) result data.
array | $a_result | |
array | $a_udf | |
int | $a_check_agreement | |
array | $a_privacy_fields | |
array | $a_filters |
Definition at line 317 of file class.ilTrQuery.php.
References $ilDB, $query, $row, array, and ilMemberAgreement\lookupAcceptedAgreements().
|
static |
Get all user-based tracking data for object.
int | $a_ref_id | |
string | $a_order_field | |
string | $a_order_dir | |
int | $a_offset | |
int | $a_limit | |
array | $a_filters | |
array | $a_additional_fields | |
int | $check_agreement | (obj id of parent course) |
arry | $privacy_fields |
Definition at line 236 of file class.ilTrQuery.php.
References $ilDB, $query, $result, ilObject\_lookupObjectId(), array, and ilUtil\stableSortArray().
Referenced by ilTrObjectUsersPropsTableGUI\getItems().
|
static |
Definition at line 1463 of file class.ilTrQuery.php.
References $ilDB, $query, $res, $row, ilCourseObjective\_getObjectiveIds(), array, ilLOSettings\getInstanceByObjId(), ilLPStatus\LP_STATUS_COMPLETED_NUM, ilLPStatus\LP_STATUS_FAILED_NUM, ilLPStatus\LP_STATUS_IN_PROGRESS_NUM, ilLPStatus\LP_STATUS_NOT_ATTEMPTED_NUM, ilLOUserResults\STATUS_COMPLETED, ilLOUserResults\STATUS_FAILED, and ilLOUserResults\TYPE_QUALIFIED.
Referenced by ilTrMatrixTableGUI\getItems().
|
static |
Get status matrix for users on objects.
int | $a_parent_ref_id | |
array | $a_obj_ids | |
string | $a_user_filter | |
array | $a_additional_fields | |
array | $a_privacy_fields | |
int | $a_check_agreement |
Definition at line 1369 of file class.ilTrQuery.php.
References $ilDB, $query, $result, $row, ilObject\_lookupObjectId(), and array.
Referenced by ilTrMatrixTableGUI\getItems().
|
static |
Definition at line 1610 of file class.ilTrQuery.php.
References $ilDB, $res, $row, and array.
Referenced by ilLPObjectStatisticsDailyTableGUI\getItems(), and ilLPObjectStatisticsTableGUI\getItems().
|
staticprotected |
check whether status (for all relevant users) exists
array | $a_obj_ids | |
array | $a_users |
Definition at line 1784 of file class.ilTrQuery.php.
References ilLPStatus\checkStatusForObject().
|
static |
Definition at line 1728 of file class.ilTrQuery.php.
References $a_type, $ilDB, $res, $row, ilObject\_getAllReferences(), and array.