You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
515 B
17 lines
515 B
class DashboardController < SqmApplicationController
|
|
|
|
def index
|
|
@variance_chart_row_presenters = Measure.all.map(&method(:presenter_for_measure))
|
|
|
|
@category_presenters = SqmCategory.sorted.map { |sqm_category| CategoryPresenter.new(category: sqm_category) }
|
|
end
|
|
|
|
private
|
|
|
|
def presenter_for_measure(measure)
|
|
score = SurveyItemResponse.score_for_measure(measure: measure, school: @school, academic_year: @academic_year)
|
|
|
|
VarianceChartRowPresenter.new(measure: measure, score: score)
|
|
end
|
|
end
|