class Searching::GuideProgress::TotalAssignments

Public Instance Methods

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