function opigno_lrs_stats_query_scope_course_context in Opigno TinCan API 7
Scope pipeline to retrieve only statements with course context
Note: "opigno_lrs_stats_query_scope_unwind_context" must be called first on pipeline
Parameters
$pipeline: A structured pipeline array.
Return value
array A structured pipeline array.
3 calls to opigno_lrs_stats_query_scope_course_context()
- opigno_lrs_stats_all_course_content_finished_statements in modules/
opigno_tincan_api_stats/ includes/ model/ queries.inc - Retrieve all course content finished statements (caching for current request)
- opigno_lrs_stats_all_course_content_statements in modules/
opigno_tincan_api_stats/ includes/ model/ queries.inc - Retrieve all course content statements (caching for current request)
- opigno_lrs_stats_all_course_content_viewed_statements in modules/
opigno_tincan_api_stats/ includes/ model/ queries.inc - Retrieve all course content viewed statements (caching for current request)
File
- modules/
opigno_tincan_api_stats/ includes/ model/ scopes.inc, line 169 - Implements functions to scope queries
Code
function opigno_lrs_stats_query_scope_course_context($pipeline) {
return opigno_lrs_stats_query_match($pipeline, array(
'statement.context.contextActivities.grouping.definition.type' => OpignoTincanApiTinCanActivityDefinitionTypes::$course,
));
}