mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-09 07:28:41 -07:00
average those groupings and the way up the framework. Likert scores for a survey_item are averaged. Then all the survey_items in a scale are averaged. Then student scales in a measure are averaged. And teacher scales in a measure are averaged. Then the average of those two calculations becomes the score for a measure. Then the measures in a subcategory are averaged.
11 lines
277 B
Ruby
11 lines
277 B
Ruby
class AdminDataItem < ActiveRecord::Base
|
|
belongs_to :scale
|
|
|
|
scope :for_measures, lambda { |measures|
|
|
joins(:scale).where('scale.measure': measures)
|
|
}
|
|
|
|
scope :non_hs_items_for_measures, lambda { |measure|
|
|
for_measures(measure).where(hs_only_item: false)
|
|
}
|
|
end
|