You are here

function opigno_lrs_stats_query_limit in Opigno TinCan API 7

Set pipeline to retrieve only a fixed number of statements

Parameters

array $pipeline: A structured pipeline array.

int $limit:

Return value

array A structured pipeline array.

File

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

Code

function opigno_lrs_stats_query_limit($pipeline, $limit) {
  $pipeline[]['$limit'] = $limit;
  return $pipeline;
}