tweaking question partial

pull/1/head
Jared Cosulich 7 years ago
parent 3531cafa33
commit 93485bd886

@ -30,7 +30,7 @@
%h5 Insufficient Responses %h5 Insufficient Responses
%p No data is displayed for this question because of 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)}" -#%p= "Responded: #{aggregated_responses.count}, Possible: #{@school.available_responders_for(question)}"
%p= "Source: #{question.target_group}" %p= "Source: #{question.for_teachers? ? "Teachers" : "Students"}"
- if valid_responses - if valid_responses
.clearfix .clearfix

@ -567,7 +567,7 @@ end
# school_category.update( # school_category.update(
# valid_child_count: school_question_data.valid_child_count, # valid_child_count: school_question_data.valid_child_count,
# response_count: school_question_data.response_count, # response_count: school_question_data.response_count,
# response_total: school_question_data.response_total # answer_index_total: school_question_data.response_total
# ) # )
# end # end
# end # end
@ -584,13 +584,15 @@ end
# school = school_category.school # school = school_category.school
# #
# children = SchoolCategory.for_parent_category(school, parent_category).in(school_category.year) # children = SchoolCategory.for_parent_category(school, parent_category).in(school_category.year)
# valid_child_count = children.where("valid_child_count > 0").count # valid_children = children.where("valid_child_count > 0")
# school_category.update( # school_category.update(
# valid_child_count: valid_child_count # valid_child_count: valid_children.count,
# response_count: valid_children.sum(&:response_count),
# answer_index_total: valid_children.sum(&:answer_index_total)
# ) # )
# puts "" # puts ""
# puts "" # puts ""
# puts("#{level} (#{i}/#{categories.length}) UPDATED (#{index}/#{school_categories.length}): #{school.slug} -> #{parent_category.slug} -> #{school_category.year} -> #{valid_child_count} --- PARENT: #{parent_categories.length}") # puts("#{level} (#{i}/#{categories.length}) UPDATED (#{index}/#{school_categories.length}): #{school.slug} -> #{parent_category.slug} -> #{school_category.year} -> #{valid_children.count} --- PARENT: #{parent_categories.length}")
# puts "" # puts ""
# puts "" # puts ""
# end # end

Loading…
Cancel
Save