class Section

Public Instance Methods

count_students() click to toggle source

returns the number of students in this section

# File app/models/section.rb, line 12
def count_students
  students.size
end
has_students?() click to toggle source

Returns true when students are part of this section

# File app/models/section.rb, line 7
def has_students?
  !students.empty?
end
section_due_date_for(aid) click to toggle source
# File app/models/section.rb, line 16
def section_due_date_for(aid)
  SectionDueDate.find_by_assignment_id_and_section_id(aid, self.id)
end
user_can_modify?(current_user) click to toggle source
# File app/models/section.rb, line 20
def user_can_modify?(current_user)
  current_user.admin?
end