Refactor filter view for teacher