diff --git a/app/views/questions/_question.html.haml b/app/views/questions/_question.html.haml index 9119c51d..d203fb0e 100644 --- a/app/views/questions/_question.html.haml +++ b/app/views/questions/_question.html.haml @@ -1,6 +1,6 @@ - aggregated_responses = question.aggregated_responses_for_school(@school) - return if aggregated_responses.nil? -- school_question = SchoolQuestion.for(@school, question) +- school_questions = SchoolQuestion.for(@school, question) - valid_responses = (aggregated_responses.count.to_f / @school.available_responders_for(question).to_f) >= 0.3 .col-12.col-md-6.py-3 @@ -49,6 +49,9 @@ %p.collapse{id: "raw-data#{question.id}"} = aggregated_responses.responses.map(&:answer_index_with_reverse).join(', ') - - if school_question.present? + - if school_questions.present? .clearfix + - if school_questions.length > 1 + %p= "More than one school question: #{school_questions.length}" + - school_question = school_questions.first %p= "Attempts: #{school_question.attempt_count}, Responses: #{school_question.response_count}, Response Rate: #{school_question.response_rate}"