Class: Searching::GuideProgress::NotFailedAssignments

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



26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/mumuki/classroom/models/searching/guide_progress.rb', line 26

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