mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-07 21:48:16 -08:00
fixing school category order
This commit is contained in:
parent
cff7fc81e1
commit
fcf15e9c2f
2 changed files with 5 additions and 1 deletions
|
|
@ -14,6 +14,10 @@ class SchoolCategory < ApplicationRecord
|
|||
|
||||
scope :valid, -> { where("response_count > #{MIN_RESPONSE_COUNT} or zscore is not null") }
|
||||
|
||||
def root_index
|
||||
category.root_index
|
||||
end
|
||||
|
||||
def answer_index_average
|
||||
answer_index_total.to_f / response_count.to_f
|
||||
end
|
||||
|
|
|
|||
|
|
@ -9,6 +9,6 @@
|
|||
%p No data is displayed for this school because of insufficient responses.
|
||||
- else
|
||||
.row
|
||||
= render @school_categories
|
||||
= render @school_categories.sort(&:root_index)
|
||||
|
||||
= render "shared/performance_spectrum"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue