It depends on how you define "groups" but yes, you can easily do this. Manually enrol students into the courses you wish them to be able to access and as long as Self enrolment is disabled they will not be able to access the other courses. Or you can create the groups as cohorts and again enrol the appropriate cohorts into the courses you wish. See Cohorts
Enrolment
Three different groups enrollment
This discussion has been locked so you can no longer reply to it.