Hi Fergal
The problem is that roles aren't able to be applied at a group level - this means a role of trainer in a course would have trainer rights to all course participants not just their group.
If this isn't an issue then creating groups are a good way to separate students - you can even have a group enrolment key for a course that can be provided to learners and when they enter this they are added to the appropriate group according to the key.
Craig