updates to UI to handle nonlikert data, sample nonlikert data

This commit is contained in:
Jared Cosulich 2018-01-26 13:57:23 -05:00
parent 76b98c2c25
commit adc2c1318a
5 changed files with 36 additions and 11 deletions

View file

@ -5,7 +5,8 @@ AggregatedResponses = Struct.new(
:count,
:answer_index_total,
:answer_index_average,
:most_popular_answer
:most_popular_answer,
:zscore
)
class Question < ApplicationRecord

View file

@ -27,9 +27,15 @@
&nbsp; &nbsp; &nbsp;
- if @school_category.zscore.present?
%b Administrative&nbsp;Data
= @school_category.zscore.round(1) + 3
(out of 5)
%b Administrative&nbsp;Data:
- if @school_category.nonlikert.present?
= @school_category.nonlikert
= "(Benchmark: #{@school_category.category.benchmark})"
&nbsp;
- if @school_category.zscore.present?
= [(@school_category.zscore.round(1) + 3), 5].min
(out of 5)
.indicator-container.py-3
= render 'school_categories/indicator', info: @school_category