mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-07 21:48:16 -08:00
Reorder gender columns
This commit is contained in:
parent
4f035f6a63
commit
35c8199887
3 changed files with 165 additions and 164 deletions
|
|
@ -9,11 +9,11 @@ module Analyze
|
|||
end
|
||||
|
||||
def to_s
|
||||
'Students by Gender'
|
||||
"Students by Gender"
|
||||
end
|
||||
|
||||
def slug
|
||||
'students-by-gender'
|
||||
"students-by-gender"
|
||||
end
|
||||
|
||||
def columns
|
||||
|
|
@ -21,6 +21,7 @@ module Analyze
|
|||
genders.each do |gender|
|
||||
array << column_for_gender_code(code: gender.qualtrics_code)
|
||||
end
|
||||
array.sort_by!(&:to_s)
|
||||
array << Analyze::Graph::Column::AllStudent
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -79,12 +79,12 @@ module Analyze
|
|||
gender_params = params[:genders]
|
||||
return genders unless gender_params
|
||||
|
||||
gender_params.split(",").map { |gender| Gender.find_by_designation(gender) }.compact
|
||||
gender_params.split(",").sort.map { |gender| Gender.find_by_designation(gender) }.compact
|
||||
end
|
||||
end
|
||||
|
||||
def genders
|
||||
@genders ||= Gender.all
|
||||
@genders ||= Gender.all.order(designation: :ASC)
|
||||
end
|
||||
|
||||
def groups
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue