Class: Sorting::Student::ByProgress

Inherits:
TotalStatsSortBy show all
Defined in:
lib/mumuki/classroom/models/sorting/student.rb

Class Method Summary collapse

Methods inherited from TotalStatsSortBy

pipeline

Class Method Details

.order_by(ordering) ⇒ Object



19
20
21
22
23
24
25
26
# File 'lib/mumuki/classroom/models/sorting/student.rb', line 19

def self.order_by(ordering)
  {'stats.total': ordering,
   'stats.failed': !ordering,
   'stats.passed_with_warnings': !ordering,
   'stats.passed': !ordering,
   'last_name': ordering,
   'first_name': ordering}
end