Are you asking about the "Enrolled users" page in a course? If you need to be able to filter roles on that page, you could maybe define separate enrollment methods for students and teachers, and then filter by enrollment method. Otherwise, the "Participants" link in the course allows you to view users by role.
Roles and permissions
This discussion has been locked because a year has elapsed since the last post. Please start a new discussion topic.