That was the fallback scenario that Philip mentioned and was hoping to avoid.
In my opinion we should really consider removing the moodle/site:accessallgroups capability from the non-editing teacher role. The role is often used by groups such as teaching assistant / class tutors who are not responsible for the course as a whole, only a small selection of it.
This is the correct use of this functionality and once this capability has been removed and the tutors are also in the relevant group with the students that they are working with, the forum groupings and post to many groups behaviours work exactly as Philip is asking about.
Doing this also means that tutors who only work with some groups of students don't have to scroll through the groups they don't care about to find their own, and tutors who only have responsibility over a single group aren't greeted with the group select at all.
The only caveat to this is where a tutor covers for another tutor who is away. In this instance they would not have access to that group of students. I would still argue that this is the correct behaviour, and the solution in this case is that they can be added to the relevant group for the period required.
By making this change other areas are also improved - e.g. the Recent activity block only shows activity for the groups that the tutor works with, the Dashboard only shows updates for the relevant groups, Search only shows results for users in their groups, Forum notifications are only received for the relevant groups, etc.
Doing the above makes a lot of sense in many activities in Moodle. For example, in the assignment module, only the groups that the tutor is responsible for are shown, the tutor can only take part in chats for their groups. Most of the activity modules in Moodle support groups very well.
I'd also recommend using groups for a few other reasons:
- restricting student class lists to the relevant students helps prevent data leaks and manages risk;
- it simplifies the user interface, and improves the user experience for tutors; and
- helps to highlight only relevant information to those users.
Basically, this is what groups and groupings are for. The thing that really confuses things here is the over-use of the accessallgroups capability. I have just created MDL-55981 to discuss the removal of this capability from some roles.