
Principals bug in student.rb, Gets all grade specific principals in district
Reported by shawn (at vegantech) | September 30th, 2010 @ 02:00 PM | in Evaluate to see if applicable.
I should also refactor all_students_in_school as it doesn't really need an argument for the school.
Note in the code here, the second principals << line (156) does not filter by the specific school at all.
148 def special_group_principals
149 grades = enrollments.collect(&:grade)
150 schools = enrollments.collect(&:school_id)
151 principals = []
152
153 principals <<
district.special_user_groups.principal.all_students_in_district.collect(&:user)
154 schools.each do |school|
155 principals <<
district.special_user_groups.principal.all_students_in_school(school).collect(&:user)
156 principals <<
district.special_user_groups.principal.find_all_by_grouptype_and_grade(SpecialUserGroup::ALL_STUDENTS_IN_SCHOOL,
grades).collect(&:user)
157 end
158
159 principals
160 end
Comments and changes to this ticket
-
shawn (at vegantech) September 30th, 2010 @ 11:33 PM
(from [8a7590d93d145bd157d2e0a36a99fb6450b5dfa1]) [#510] fix principals method so it is limited to the proper school http://github.com/vegantech/sims/commit/8a7590d93d145bd157d2e0a36a9...
-
shawn (at vegantech) November 9th, 2012 @ 07:26 PM
- Milestone changed from Demo Site and Export Doc/Feedback to Evaluate to see if applicable.
- Milestone order changed from 54 to 0
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Student Intervention Monitoring System
People watching this ticket
Referenced by
-
510 Principals bug in student.rb, Gets all grade specific principals in district (from [8a7590d93d145bd157d2e0a36a99fb6450b5dfa1]) [#510] ...