class Searching::GuideProgress::NotFailedAssignments

Public Instance Methods

pipeline() click to toggle source
# 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