mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-09 07:28:41 -07:00
Visualize survey responses even when a response rate cannot be
calculated. Set the response rate to N / A for data that has no total student and teacher data for a certain year and school
This commit is contained in:
parent
c0a8905fba
commit
91308b93e5
5 changed files with 47 additions and 11 deletions
|
|
@ -30,11 +30,14 @@ class SubcategoryPresenter
|
|||
end
|
||||
|
||||
def student_response_rate
|
||||
@subcategory.student_response_rate(school: @school, academic_year: @academic_year).rate
|
||||
return 'N / A' if Respondent.where(school: @school, academic_year: @academic_year).count.zero?
|
||||
|
||||
"#{@subcategory.student_response_rate(school: @school, academic_year: @academic_year).rate}%"
|
||||
end
|
||||
|
||||
def teacher_response_rate
|
||||
@subcategory.teacher_response_rate(school: @school, academic_year: @academic_year).rate
|
||||
return 'N / A' if Respondent.where(school: @school, academic_year: @academic_year).count.zero?
|
||||
"#{@subcategory.teacher_response_rate(school: @school, academic_year: @academic_year).rate}%"
|
||||
end
|
||||
|
||||
def admin_collection_rate
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue