Class: Searching::GuideProgress::TotalAssignments

Inherits:
NumericFilter show all
Includes:
QueryOperands
Defined in:
lib/mumuki/classroom/models/searching/guide_progress.rb

Instance Method Summary collapse

Methods included from QueryOperands

#close_to, #default_query_operand, #less_than, #more_than

Methods included from QueryOperands

#current_query_operand, #current_query_operand_method

Methods inherited from NumericFilter

#query_param=

Methods inherited from BaseFilter

#query

Instance Method Details

#pipelineObject



51
52
53
54
55
56
57
58
59
60
# File 'lib/mumuki/classroom/models/searching/guide_progress.rb', line 51

def pipeline
  [
    {
      '$addFields': {'stats.total': {'$sum': %w($stats.passed $stats.passed_with_warnings $stats.failed)}}
    },
    {
      '$match': {'stats.total': current_query_operand }
    }
  ]
end