lib/student_report.rb
# request is a hash with the following keys
# :cl = -1 for any class, or 9|10|11|12 to filter by *current* class
# :co = -1 for any coordinator, or a positive integer to filter by coordinator's user ID
# :sy = required school year filter
# :na = blank for any name, or string to filter by student name fragment
#
# students - list of students
request is a hash with the following keys
:cl = -1 for any class, or 9|10|11|12 to filter by *current* class
:co = -1 for any coordinator, or a positive integer to filter by coordinator's user ID
:sy = required school year filter
:na = blank for any name, or string to filter by student name fragment

list of students
request is a hash with the following keys : cl = - 1 for any class or 9|10|11|12 to filter by * current * class : co = - 1 for any coordinator or a positive integer to filter by coordinator ' s user ID : sy = required school year filter : na = blank for any name or string to filter by student name fragment list of students
def ale_data(request, students)
    months = Term.coor(request[:sy]).months
    return nil if students.empty?
    statuses = Status.find(:all, :conditions => ["statusable_type = 'User' and statusable_id in (?)", students.collect(&:id)])
    return [statuses.group_by(&:statusable_id), months]
  end
def ale_data ( request , students ) months = Term . coor ( request [ :sy ] ) . months return nil if students . empty? statuses = Status . find ( :all , :conditions => [ "statusable_type = 'User' and statusable_id in (?)" , students . collect ( & :id ) ] ) return [ statuses . group_by ( & :statusable_id ) , months ] end
request is a hash with the following keys
:cl = -1 for any class, or 9|10|11|12 to filter by *current* class
:co = -1 for any coordinator, or a positive integer to filter by coordinator's user ID
:sy = required school year filter
:na = blank for any name, or string to filter by student name fragment
request is a hash with the following keys : cl = - 1 for any class or 9|10|11|12 to filter by * current * class : co = - 1 for any coordinator or a positive integer to filter by coordinator ' s user ID : sy = required school year filter : na = blank for any name or string to filter by student name fragment
request
<not_specific>
students
<not_specific>