Easy: Add one extra enrollment method for teachers that assign the role "teacher" and set the max enrollment for this method to -0-. Give this method a meaningful title so the users can see that this is for the teachers.
Disable the option "Max enrolled users" for teachers
This discussion has been locked because a year has elapsed since the last post. Please start a new discussion topic.