|
|
|
@ -1,11 +1,13 @@
|
|
|
|
- aggregated_responses = question.aggregated_responses_for_school(@school)
|
|
|
|
- aggregated_responses = question.aggregated_responses_for_school(@school)
|
|
|
|
- return if aggregated_responses.nil?
|
|
|
|
- return if aggregated_responses.nil?
|
|
|
|
|
|
|
|
- valid_responses = (aggregated_responses.count.to_f / @school.available_responders_for(question).to_f) >= 0.3
|
|
|
|
|
|
|
|
|
|
|
|
.col-12.col-md-6.py-3
|
|
|
|
.col-12.col-md-6.py-3
|
|
|
|
.question.p-2{id: "question-#{question.id}"}
|
|
|
|
.question.p-2{id: "question-#{question.id}"}
|
|
|
|
%p.question-text.pt-3.px-2
|
|
|
|
%p.question-text.pt-3.px-2
|
|
|
|
= question.normalized_text
|
|
|
|
= question.normalized_text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- if valid_responses
|
|
|
|
.row.pt-2
|
|
|
|
.row.pt-2
|
|
|
|
.col-4.indicator-container.centered
|
|
|
|
.col-4.indicator-container.centered
|
|
|
|
= render 'school_categories/indicator', info: aggregated_responses, small: true
|
|
|
|
= render 'school_categories/indicator', info: aggregated_responses, small: true
|
|
|
|
@ -20,7 +22,16 @@
|
|
|
|
%p
|
|
|
|
%p
|
|
|
|
%b Source:
|
|
|
|
%b Source:
|
|
|
|
= question.source.titleize
|
|
|
|
= question.source.titleize
|
|
|
|
|
|
|
|
- else
|
|
|
|
|
|
|
|
.row.pt-2
|
|
|
|
|
|
|
|
.col-12.centered
|
|
|
|
|
|
|
|
.px-2
|
|
|
|
|
|
|
|
%h5 Insufficient Responses
|
|
|
|
|
|
|
|
%p No data is displayed for this question because of insufficient responses.
|
|
|
|
|
|
|
|
-#%p= "Responded: #{aggregated_responses.count}, Possible: #{@school.available_responders_for(question)}"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- if valid_responses
|
|
|
|
.clearfix
|
|
|
|
.clearfix
|
|
|
|
|
|
|
|
|
|
|
|
.show-hide.px-2
|
|
|
|
.show-hide.px-2
|
|
|
|
|