Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Principals bug in student.rb, Gets all grade specific principals in district

#510

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

Reported by shawn (at vegantech) · September 30th, 2010 @ 02:00 PM

State: new
Assigned to: shawn (at vegantech) shawn (at vegantech)

Activity

  1. shawn (at vegantech)
  2. shawn (at vegantech)
    shawn (at vegantech)
    • Milestone changed from Demo Site and Export Doc/Feedback to Evaluate to see if applicable.
    • Milestone order changed from 54 to 0

    November 9th, 2012 @ 07:26 PM

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.