| ILIAS
    Release_4_4_x_branch Revision 61816
    | 
Tracking query class. More...
 Collaboration diagram for ilTrQuery:
 Collaboration diagram for ilTrQuery:| Public Member Functions | |
| getObjectsStatusForUser ($a_user_id, array $obj_refs) | |
| getObjectivesStatusForUser ($a_user_id, array $a_objective_ids) | |
| getSCOsStatusForUser ($a_user_id, $a_parent_obj_id, array $a_sco_ids) | |
| getSubItemsStatusForUser ($a_user_id, $a_parent_obj_id, array $a_item_ids) | |
| getObjectTypeStatistics () | |
| getObjectTypeStatisticsPerMonth ($a_aggregation, $a_year=null) | |
| Static Public Member Functions | |
| 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. | |
| 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. | |
| 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. | |
| static | getParticipantsForObject ($a_ref_id) | 
| Get participant ids for given object. | |
| 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) | |
| static | executeQueries (array $queries, $a_order_field="", $a_order_dir="", $a_offset=0, $a_limit=9999) | 
| Execute given queries, including count query. | |
| 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. | |
| static | getUserObjectiveMatrix ($a_parent_obj_id, $a_users) | 
| static | getObjectAccessStatistics (array $a_ref_ids, $a_year, $a_month=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. | |
| static | getObjectLPStatistics (array $a_obj_ids, $a_year, $a_month=null, $a_group_by_day=false) | 
| 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. | |
| static | getSessionData ($a_user_id, array $obj_ids) | 
| Get session data for given objects and user. | |
| static | getSummaryDataForObject ($a_ref_id, array $fields, array $a_filters=NULL) | 
| Get all aggregated tracking data for object. | |
| static | getSummaryPercentages ($field, $base_query, $alias=NULL) | 
| Get aggregated data for field. | |
| static | buildFilters (array $where, array $a_filters=NULL, $a_aggregate=false) | 
| Build sql from filter definition. | |
| static | buildColumns (array &$a_fields, array $a_additional_fields=NULL, $a_aggregate=false) | 
| Build sql from field definition. | |
| static | getSubTree ($a_parent_ref_id, array &$a_object_ids, array &$a_ref_ids) | 
| Get complete branch of tree (recursively) | |
| static | refreshObjectsStatus (array $a_obj_ids, $a_users=null) | 
| check whether status (for all relevant users) exists | |
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 1114 of file class.ilTrQuery.php.
Referenced by getObjectsDataForUser(), getObjectsSummaryForObject(), getUserDataForObject(), and getUserObjectMatrix().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | staticprotected | 
Build sql from filter definition.
| array | $where | |
| array | $a_filters | |
| bool | $a_aggregate | 
Definition at line 919 of file class.ilTrQuery.php.
References IL_CAL_DATETIME, IL_CAL_UNIX, and ilLPStatus\LP_STATUS_NOT_ATTEMPTED_NUM.
Referenced by getObjectsDataForUser(), getSummaryDataForObject(), getUserDataForObject(), getUserObjectiveMatrix(), and getUserObjectMatrix().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | static | 
Definition at line 1685 of file class.ilTrQuery.php.
Referenced by ilLPObjectStatisticsGUI\deleteData().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | static | 
Execute given queries, including count query.
| array | $queries | fields, query, count | 
| string | $a_order_field | |
| string | $a_order_dir | |
| int | $a_offset | |
| int | $a_limit | 
Definition at line 1367 of file class.ilTrQuery.php.
References $query, and $result.
Referenced by getObjectsDataForUser(), getSummaryDataForObject(), getUserDataForObject(), getUserObjectiveMatrix(), and getUserObjectMatrix().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | static | 
Definition at line 1549 of file class.ilTrQuery.php.
Referenced by ilLPObjectStatisticsTableGUI\getItems().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | static | 
Definition at line 1640 of file class.ilTrQuery.php.
Referenced by ilLPObjectStatisticsDailyTableGUI\getItems().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | 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 1224 of file class.ilTrQuery.php.
References ilLPStatusFactory\_getInstance(), ilObject\_lookupObjId(), ilObject\_lookupType(), ilObjectLP\getInstance(), getSubTree(), ilLPObjSettings\LP_MODE_COLLECTION_MANUAL, ilLPObjSettings\LP_MODE_COLLECTION_TLT, ilLPObjSettings\LP_MODE_OBJECTIVES, ilLPObjSettings\LP_MODE_SCORM, and refreshObjectsStatus().
Referenced by ilTrMatrixTableGUI\getItems(), getObjectsDataForUser(), and getObjectsSummaryForObject().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| ilTrQuery::getObjectivesStatusForUser | ( | $a_user_id, | |
| array | $a_objective_ids | ||
| ) | 
Definition at line 91 of file class.ilTrQuery.php.
References $query, $result, and ilLPStatus\LP_STATUS_COMPLETED_NUM.
Referenced by ilLPProgressTableGUI\getItems().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | static | 
Definition at line 1808 of file class.ilTrQuery.php.
Referenced by ilLPObjectStatisticsLPTableGUI\getDetailItems(), and ilLPObjectStatisticsLPTableGUI\getItems().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | 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 435 of file class.ilTrQuery.php.
References $query, $result, $row, ilObjSAHSLearningModule\_lookupSubType(), buildColumns(), buildFilters(), executeQueries(), getObjectIds(), getSessionData(), 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().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| ilTrQuery::getObjectsStatusForUser | ( | $a_user_id, | |
| array | $obj_refs | ||
| ) | 
Definition at line 14 of file class.ilTrQuery.php.
References $query, $result, ilObjectLP\getInstance(), getSessionData(), IL_CRS_VIEW_OBJECTIVE, ilLPObjSettings\LP_MODE_OBJECTIVES, and refreshObjectsStatus().
Referenced by ilLPProgressTableGUI\getItems().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | 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 636 of file class.ilTrQuery.php.
References $ref_id, $result, buildColumns(), getObjectIds(), and getSummaryDataForObject().
Referenced by ilTrSummaryTableGUI\getItems().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | static | 
Get last update info for object statistics.
Definition at line 1799 of file class.ilTrQuery.php.
Referenced by ilLPObjectStatisticsGUI\showAggregationInfo().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | static | 
Definition at line 1668 of file class.ilTrQuery.php.
Referenced by ilLPObjectStatisticsAdminTableGUI\getItems().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilTrQuery::getObjectTypeStatistics | ( | ) | 
Definition at line 1605 of file class.ilTrQuery.php.
References $res, $row, and ilObjectDefinition\MODE_REPOSITORY.
Referenced by ilLPCronObjectStatistics\gatherTypesData(), and ilLPObjectStatisticsTypesTableGUI\getItems().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilTrQuery::getObjectTypeStatisticsPerMonth | ( | $a_aggregation, | |
| $a_year = null | |||
| ) | 
Definition at line 1845 of file class.ilTrQuery.php.
Referenced by ilLPObjectStatisticsTypesTableGUI\getItems().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | static | 
Get participant ids for given object.
| int | $a_ref_id | 
Definition at line 824 of file class.ilTrQuery.php.
References $path, ilLPStatusFactory\_getClassById(), ilGroupParticipants\_getInstanceByObjId(), ilCourseParticipants\_getInstanceByObjId(), ilObjSCORMTracking\_getTrackedUsers(), ilObject\_lookupObjectId(), ilObjSAHSLearningModule\_lookupSubType(), ilObject\_lookupType(), and ilLPObjSettings\LP_MODE_TEST_FINISHED.
Referenced by getSummaryDataForObject(), getUserDataForObject(), and getUserObjectMatrix().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| ilTrQuery::getSCOsStatusForUser | ( | $a_user_id, | |
| $a_parent_obj_id, | |||
| array | $a_sco_ids | ||
| ) | 
Definition at line 114 of file class.ilTrQuery.php.
References ilLPStatusWrapper\_getStatusInfo(), ilObjSAHSLearningModule\_lookupSubType(), ilLPStatus\LP_STATUS_COMPLETED, ilLPStatus\LP_STATUS_FAILED, ilLPStatus\LP_STATUS_IN_PROGRESS, ilLPStatus\LP_STATUS_NOT_ATTEMPTED, and refreshObjectsStatus().
Referenced by ilLPProgressTableGUI\getItems().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | staticprotected | 
Get session data for given objects and user.
| int | $a_user_id | |
| array | $obj_ids | 
Definition at line 586 of file class.ilTrQuery.php.
References $query, ilDatePresentation\formatPeriod(), and IL_CAL_DATETIME.
Referenced by getObjectsDataForUser(), and getObjectsStatusForUser().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| ilTrQuery::getSubItemsStatusForUser | ( | $a_user_id, | |
| $a_parent_obj_id, | |||
| array | $a_item_ids | ||
| ) | 
Definition at line 183 of file class.ilTrQuery.php.
References $ref_id, ilObject\_getAllReferences(), ilLPStatusWrapper\_getStatusInfo(), ilObject\_lookupType(), ilObjectLP\getInstance(), ilLPStatus\LP_STATUS_COMPLETED, ilLPStatus\LP_STATUS_IN_PROGRESS, ilLPStatus\LP_STATUS_NOT_ATTEMPTED, and refreshObjectsStatus().
Referenced by ilLPProgressTableGUI\getItems().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | staticprotected | 
Get complete branch of tree (recursively)
| int | $a_parent_ref_id | |
| array | $a_object_ids | |
| array | $a_ref_ids | 
Definition at line 1313 of file class.ilTrQuery.php.
References ilObjectLP\getInstance(), and ilLPObjSettings\LP_MODE_UNDEFINED.
Referenced by getObjectIds().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | staticprotected | 
Get all aggregated tracking data for object.
| int | $a_ref_id | |
| array | $fields | |
| array | $a_filters | 
Definition at line 703 of file class.ilTrQuery.php.
References $query, $result, $valid, ilObject\_lookupObjectId(), buildFilters(), executeQueries(), getParticipantsForObject(), getSummaryPercentages(), and refreshObjectsStatus().
Referenced by getObjectsSummaryForObject().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | staticprotected | 
Get aggregated data for field.
| string | $field | |
| string | $base_query | |
| string | $alias | 
Definition at line 786 of file class.ilTrQuery.php.
References $query, and $result.
Referenced by getSummaryDataForObject().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | 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 330 of file class.ilTrQuery.php.
References $query, $row, and ilMemberAgreement\lookupAcceptedAgreements().
Referenced by getUserDataForObject(), and getUserObjectMatrix().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | 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 253 of file class.ilTrQuery.php.
References $query, $result, ilObject\_lookupObjectId(), buildColumns(), buildFilters(), executeQueries(), getParticipantsForObject(), getUDFAndHandlePrivacy(), refreshObjectsStatus(), and ilUtil\stableSortArray().
Referenced by ilTrObjectUsersPropsTableGUI\getItems().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | static | 
Definition at line 1526 of file class.ilTrQuery.php.
References $query, buildFilters(), and executeQueries().
Referenced by ilTrMatrixTableGUI\getItems().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | 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 1446 of file class.ilTrQuery.php.
References $query, $result, $row, ilObject\_lookupObjectId(), buildColumns(), buildFilters(), executeQueries(), getParticipantsForObject(), getUDFAndHandlePrivacy(), and refreshObjectsStatus().
Referenced by ilTrMatrixTableGUI\getItems().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | staticprotected | 
check whether status (for all relevant users) exists
| array | $a_obj_ids | |
| array | $a_users | 
Definition at line 1785 of file class.ilTrQuery.php.
References ilLPStatus\checkStatusForObject().
Referenced by getObjectIds(), getObjectsStatusForUser(), getSCOsStatusForUser(), getSubItemsStatusForUser(), getSummaryDataForObject(), getUserDataForObject(), and getUserObjectMatrix().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | static | 
Definition at line 1716 of file class.ilTrQuery.php.
References $ref_id, $res, $row, and ilObject\_getAllReferences().
 Here is the call graph for this function:
 Here is the call graph for this function: