You can add cohorts to categories. Have you looked at setting student permissions at the category level? I am not sure if that would work specifically but I still think cohorts is going to be your answer.
Enrolment
Self-enrollment only in a given category
Обсуждение было заблокировано, поэтому на него нельзя больше отвечать.