From 18e831702c9025312f030d564c3abdabd2582db0 Mon Sep 17 00:00:00 2001 From: Jared Cosulich Date: Sat, 3 Mar 2018 09:09:12 -0500 Subject: [PATCH] only show measures with 10 or more responses --- app/models/school_category.rb | 2 +- data/measures.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/school_category.rb b/app/models/school_category.rb index 6592bc8f..e20d2281 100644 --- a/app/models/school_category.rb +++ b/app/models/school_category.rb @@ -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 diff --git a/data/measures.json b/data/measures.json index a742c223..c546902b 100644 --- a/data/measures.json +++ b/data/measures.json @@ -342,6 +342,7 @@ "B": { "title": "Work Ethic", "text": "This subcategory seeks to determine the degree to which students are willing to work hard on challenging tasks, even in light of setbacks. It includes measures of perseverance, determination, and orientation toward personal growth.", + "blurb": "Are students learning to work hard on challenging tasks?", "measures": { "i": { "title": "Perseverance and Determination",