You are here

function opigno_lrs_stats_query_match in Opigno TinCan API 7

Set pipeline to retrieve only statements which match provided predicates

Parameters

array $pipeline: A structured pipeline array.

array $predicates: A structured $predicates array.

Return value

array A structured pipeline array.

10 calls to opigno_lrs_stats_query_match()
opigno_lrs_stats_query_scope_answered_statements in modules/opigno_tincan_api_stats/includes/model/scopes.inc
Scope pipeline to retrieve only answered statements
opigno_lrs_stats_query_scope_attempted_statements in modules/opigno_tincan_api_stats/includes/model/scopes.inc
Scope pipeline to retrieve only attempted statements
opigno_lrs_stats_query_scope_course_context in modules/opigno_tincan_api_stats/includes/model/scopes.inc
Scope pipeline to retrieve only statements with course context
opigno_lrs_stats_query_scope_failed_statements in modules/opigno_tincan_api_stats/includes/model/scopes.inc
Scope pipeline to retrieve only passed statements
opigno_lrs_stats_query_scope_finished_statements in modules/opigno_tincan_api_stats/includes/model/scopes.inc
Scope pipeline to retrieve only finished statements

... See full list

File

modules/opigno_tincan_api_stats/includes/model/pipeline.inc, line 35
Implements functions to progressively build a pipeline for mongoDB aggregate function

Code

function opigno_lrs_stats_query_match($pipeline, $predicates) {
  $pipeline[]['$match'] = $predicates;
  return $pipeline;
}