mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-08 23:18:18 -07:00
Add scales to framework. Change calculations to first group and then
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.
This commit is contained in:
parent
1ca88bf6d1
commit
d4df7cbc06
44 changed files with 1053 additions and 856 deletions
|
|
@ -1,11 +1,11 @@
|
|||
class AdminDataItem < ActiveRecord::Base
|
||||
belongs_to :measure
|
||||
belongs_to :scale
|
||||
|
||||
scope :for_measures, ->(measure) {
|
||||
joins(:measure).where('admin_data_items.measure': measure)
|
||||
scope :for_measures, lambda { |measures|
|
||||
joins(:scale).where('scale.measure': measures)
|
||||
}
|
||||
|
||||
scope :non_hs_items_for_measures, ->(measure) {
|
||||
scope :non_hs_items_for_measures, lambda { |measure|
|
||||
for_measures(measure).where(hs_only_item: false)
|
||||
}
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue