mirror of
https://github.com/edcommonwealth/Dashboard.git
synced 2026-03-17 09:46:25 -07:00
chore: start adding overview page
This commit is contained in:
parent
1b0af124f7
commit
64b4d599c7
33 changed files with 783 additions and 199 deletions
|
|
@ -1,7 +1,18 @@
|
|||
module Dashboard
|
||||
class ResponseRate < ApplicationRecord
|
||||
belongs_to :dashboard_subcategory
|
||||
belongs_to :school
|
||||
belongs_to :dashboard_academic_year
|
||||
TEACHER_RATE_THRESHOLD = 24.5
|
||||
STUDENT_RATE_THRESHOLD = 24.5
|
||||
|
||||
belongs_to :subcategory, class_name: "Subcategory", foreign_key: :dashboard_subcategory_id
|
||||
belongs_to :school, class_name: "School", foreign_key: :dashboard_school_id
|
||||
belongs_to :academic_year, class_name: "AcademicYear", foreign_key: :dashboard_academic_year_id
|
||||
|
||||
def meets_student_threshold?
|
||||
student_response_rate >= 24.5
|
||||
end
|
||||
|
||||
def meets_teacher_threshold?
|
||||
teacher_response_rate >= 24.5
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue