app/lib/feed_filter.rb
# Apply any student filters by role, if they are enabled.
Apply any student filters by role, if they are enabled.
Apply any student filters by role if they are enabled .
def filter_for_educator(students)
    filters = [
      CounselorFilter.new(@educator),
      HouseFilter.new(@educator),
      SectionsFilter.new(@educator),
      EnglishLanguageLearnerFilter.new(@educator),
      CommunitySchoolFilter.new(@educator)
    ]
    filtered_students = students
    filters.each do |filter|
      next unless filter.should_use?
      filtered_students = filtered_students.select {|student| filter.keep?(student) }
    end
    filtered_students
  end
def filter_for_educator ( students ) filters = [ CounselorFilter . new ( @educator ) , HouseFilter . new ( @educator ) , SectionsFilter . new ( @educator ) , EnglishLanguageLearnerFilter . new ( @educator ) , CommunitySchoolFilter . new ( @educator ) ] filtered_students = students filters . each do | filter | next unless filter . should_use? filtered_students = filtered_students . select { | student | filter . keep? ( student ) } end filtered_students end
Apply any student filters by role, if they are enabled.
Apply any student filters by role if they are enabled .
students
<not_specific>