ILIAS
eassessment Revision 61809
|
Tracking query class. More...
Public Member Functions | |
getObjectsStatusForUser ($a_user_id, array $obj_refs) | |
getObjectivesStatusForUser ($a_user_id, array $obj_ids) | |
getSCOsStatusForUser ($a_user_id, $a_parent_obj_id, array $a_sco_ids) | |
getObjectsStatus (array $obj_refs) |
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_filter=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, $use_collection=true) |
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) |
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) |
Get status matrix for users on objects. | |
static | getUserObjectiveMatrix ($a_parent_obj_id, $a_users) |
Static Protected Member Functions | |
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) |
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 1013 of file class.ilTrQuery.php.
References $pos.
Referenced by getObjectsDataForUser(), getObjectsSummaryForObject(), and getUserDataForObject().
|
staticprotected |
Build sql from filter definition.
array | $where | |
array | $a_filters | |
bool | $a_aggregate |
Definition at line 829 of file class.ilTrQuery.php.
References $ilDB, IL_CAL_DATETIME, and IL_CAL_UNIX.
Referenced by getObjectsDataForUser(), getSummaryDataForObject(), getUserDataForObject(), getUserObjectiveMatrix(), and getUserObjectMatrix().
|
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 1213 of file class.ilTrQuery.php.
Referenced by getObjectsDataForUser(), getSummaryDataForObject(), getUserDataForObject(), getUserObjectiveMatrix(), and getUserObjectMatrix().
|
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 |
Definition at line 1106 of file class.ilTrQuery.php.
References ilLPCollectionCache\_getItems(), ilLPObjSettings\_lookupMode(), ilObject\_lookupObjId(), ilObject\_lookupType(), ilLPStatus\checkStatusForObject(), getSubTree(), LP_MODE_OBJECTIVES, and LP_MODE_SCORM.
Referenced by ilTrMatrixTableGUI\getItems(), getObjectsDataForUser(), and getObjectsSummaryForObject().
ilTrQuery::getObjectivesStatusForUser | ( | $a_user_id, | |
array | $obj_ids | ||
) |
Definition at line 86 of file class.ilTrQuery.php.
References $ilDB, $query, and LP_STATUS_COMPLETED_NUM.
Referenced by ilLPProgressTableGUI\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_filter | |
array | $a_additional_fields | |
bool | $use_collection |
Definition at line 370 of file class.ilTrQuery.php.
References $ilDB, $query, $row, ilObjSAHSLearningModule\_lookupSubType(), buildColumns(), buildFilters(), executeQueries(), getObjectIds(), getSessionData(), IL_CAL_DATETIME, IL_CAL_UNIX, LP_STATUS_COMPLETED_NUM, LP_STATUS_FAILED_NUM, LP_STATUS_IN_PROGRESS_NUM, and LP_STATUS_NOT_ATTEMPTED_NUM.
Referenced by ilTrUserObjectsPropsTableGUI\getItems().
ilTrQuery::getObjectsStatus | ( | array | $obj_refs | ) |
Definition at line 144 of file class.ilTrQuery.php.
References $ilDB, $query, ilLPObjSettings\__getDefaultMode(), ilLPStatusWrapper\_getCountCompleted(), ilLPStatusWrapper\_getCountFailed(), ilLPStatusWrapper\_getCountInProgress(), ilLPStatusWrapper\_getCountNotAttempted(), IL_CRS_VIEW_OBJECTIVE, LP_MODE_DEACTIVATED, and LP_MODE_OBJECTIVES.
Referenced by ilLPObjectsTableGUI\getItems().
ilTrQuery::getObjectsStatusForUser | ( | $a_user_id, | |
array | $obj_refs | ||
) |
Definition at line 14 of file class.ilTrQuery.php.
References $ilDB, $query, ilLPObjSettings\__getDefaultMode(), getSessionData(), IL_CRS_VIEW_OBJECTIVE, and LP_MODE_OBJECTIVES.
Referenced by 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 | |
bool | $use_collection |
Definition at line 568 of file class.ilTrQuery.php.
References $ilDB, $ref_id, buildColumns(), getObjectIds(), and getSummaryDataForObject().
Referenced by ilTrSummaryTableGUI\getItems().
|
static |
Get participant ids for given object.
int | $a_ref_id |
Definition at line 732 of file class.ilTrQuery.php.
References $path, $type, ilGroupParticipants\_getInstanceByObjId(), ilCourseParticipants\_getInstanceByObjId(), ilObjSCORMTracking\_getTrackedUsers(), ilObject\_lookupObjectId(), ilObjSAHSLearningModule\_lookupSubType(), ilObject\_lookupType(), and ilLPStatusTestFinished\getParticipants().
Referenced by getSummaryDataForObject(), getUserDataForObject(), and getUserObjectMatrix().
ilTrQuery::getSCOsStatusForUser | ( | $a_user_id, | |
$a_parent_obj_id, | |||
array | $a_sco_ids | ||
) |
Definition at line 109 of file class.ilTrQuery.php.
References ilLPStatusWrapper\_getStatusInfo(), LP_STATUS_COMPLETED, LP_STATUS_FAILED, LP_STATUS_IN_PROGRESS, and 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 521 of file class.ilTrQuery.php.
References $ilDB, $query, ilDatePresentation\formatPeriod(), and IL_CAL_DATETIME.
Referenced by getObjectsDataForUser(), and getObjectsStatusForUser().
|
staticprotected |
Get complete branch of tree (recursively)
int | $a_parent_ref_id | |
array | $a_object_ids | |
array | $a_ref_ids |
Definition at line 1180 of file class.ilTrQuery.php.
References ilLPObjSettings\_lookupMode(), and LP_MODE_UNDEFINED.
Referenced by getObjectIds().
|
staticprotected |
Get all aggregated tracking data for object.
int | $a_ref_id | |
array | $fields | |
array | $a_filters |
Definition at line 613 of file class.ilTrQuery.php.
References $ilDB, $query, $valid, ilObject\_lookupObjectId(), buildFilters(), executeQueries(), getParticipantsForObject(), and getSummaryPercentages().
Referenced by getObjectsSummaryForObject().
|
staticprotected |
Get aggregated data for field.
string | $field | |
string | $base_query | |
string | $alias |
Definition at line 694 of file class.ilTrQuery.php.
Referenced by getSummaryDataForObject().
|
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 | |
bool | $check_agreement | |
arry | $privacy_fields |
Definition at line 220 of file class.ilTrQuery.php.
References $ilDB, $query, $row, ilObject\_lookupObjectId(), buildColumns(), buildFilters(), ilLPStatus\checkStatusForObject(), executeQueries(), getParticipantsForObject(), ilMemberAgreement\lookupAcceptedAgreements(), and ilUtil\stableSortArray().
Referenced by ilTrObjectUsersPropsTableGUI\getItems().
|
static |
Definition at line 1361 of file class.ilTrQuery.php.
References $ilDB, $query, buildFilters(), and executeQueries().
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 |
Definition at line 1289 of file class.ilTrQuery.php.
References $ilDB, $query, $row, ilObject\_lookupObjectId(), buildFilters(), ilLPStatus\checkStatusForObject(), executeQueries(), and getParticipantsForObject().
Referenced by ilTrMatrixTableGUI\getItems().