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
This discussion has been locked so you can no longer reply to it.