mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-07 21:48:16 -08:00
remove boston admin categories
This commit is contained in:
parent
bf5e4f3d8f
commit
93b0267dad
2 changed files with 10 additions and 0 deletions
|
|
@ -30,6 +30,11 @@ class CategoriesController < ApplicationController
|
|||
next if category.benchmark.present?
|
||||
@child_school_categories << category.school_categories.new(school: @school)
|
||||
end
|
||||
|
||||
if district.name == "Boston"
|
||||
@child_school_categories = @child_school_categories.reject { |csc| csc.admin? }
|
||||
end
|
||||
|
||||
@questions = @category.questions.created_in(@year)
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,11 @@ class SchoolCategory < ApplicationRecord
|
|||
|
||||
scope :valid, -> { where("zscore is not null or valid_child_count is not null") }
|
||||
|
||||
def admin?
|
||||
category.child_categories.each { |cc| return false if cc.benchmark.blank? }
|
||||
return true
|
||||
end
|
||||
|
||||
def root_index
|
||||
category.root_index
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue