mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-07 21:48:16 -08:00
only show measures with 10 or more responses
This commit is contained in:
parent
4cb2dce90f
commit
18e831702c
2 changed files with 2 additions and 1 deletions
|
|
@ -9,7 +9,7 @@ class SchoolCategory < ApplicationRecord
|
|||
scope :for, -> (school, category) { where(school: school).where(category: category) }
|
||||
scope :for_parent_category, -> (school, category=nil) { where(school: school).joins(:category).merge(Category.for_parent(category)) }
|
||||
|
||||
scope :valid, -> { where("answer_index_total > 0 or zscore is not null") }
|
||||
scope :valid, -> { where("answer_index_total > 10 or zscore is not null") }
|
||||
|
||||
def answer_index_average
|
||||
answer_index_total.to_f / response_count.to_f
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue