Quoting from the implementation plan:
- $SESSION->currentgroup[courseid] defines current group.
- For students it is fixed at the group they are in within that course (set at login and by visiting group page)
- For non-editing teachers it is likewise fixed at their own group (set at login and by visiting group page)
- For teachers and higher, it can be switched between any of the groups in the current course, using "group switch menu" which will be available in different places.