mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-13 09:20:38 -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.
27 lines
387 B
Ruby
27 lines
387 B
Ruby
class SubcategoryCardPresenter
|
|
attr_reader :name
|
|
|
|
def initialize(name:, zones:, score:)
|
|
@name = name
|
|
@zones = zones
|
|
@score = score
|
|
end
|
|
|
|
def harvey_ball_icon
|
|
"#{zone.type}-harvey-ball"
|
|
end
|
|
|
|
def color
|
|
zone.type.to_s
|
|
end
|
|
|
|
def insufficient_data?
|
|
zone.type == :insufficient_data
|
|
end
|
|
|
|
private
|
|
|
|
def zone
|
|
@zones.zone_for_score(@score)
|
|
end
|
|
end
|