Creating groups that are invisible to each others

Creating groups that are invisible to each others

by Mario Gharib -
Number of replies: 3
Dear moodlers,


I have received a request from saying that if it is possible to create multiple groups in a course, and in each group there will be a responsible and a number of students, and these groups are invisible to each others.

For example:

  1. Group A: std.a1, std.a2, std.a3, std.a4 & teacherA
  2. Group B: std.b1, std.b2, std.b3, std.b4 & teacherB
  3. Group C: std.c1, std.c2, std.c3, std.c4 & teacherC

Now the idea is that we want to make each group separate from the others,

For example

  • TeacherA can't see nor create any activity in group B or group C

Any idea how to make it

Best Regards,

Mario Gharib.

Average of ratings: -
In reply to Mario Gharib

Re: Creating groups that are invisible to each others

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

My understanding is that while you may be able to hide the groups from other students (not 100% sure about that, although you can certainly hide the group activities/resources), teacher role is applied at a course level and therefore above the groups level. So a teacher will be able to see all groups - you may be able to manipulate some of the permissions to also hide the contents of the group activities/resources from teachers in another group, but I don't think you can prevent the teacher seeing the group, or making new activities that they then make available to that group.

If you need that level of separation between the groups - with different activities/resources and each group being hidden from the others - inluding teachers -  I would suggest actually creating separate courses . There could then be another 'central' course that all have access to for shared resources as required.

In reply to Mario Gharib

Re: Creating groups that are invisible to each others

by Davo Smith -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

By default, teachers have the capability 'moodle/site:accessallgroups'.

If you remove this capability from teachers (either in the global role definition) or overridden at course level then they will not be able to access groups they are not a member of.

You will also need to set the course (and activities within the course) to 'separate groups' (as 'visible groups' will still allow all users to see all the groups, even if they cannot participate in all of them).

You may need to double-check that all the activities and the gradebook support this properly.

In reply to Mario Gharib

Re: Creating groups that are invisible to each others

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

The separate groups feature is designed for this.  I recommend creating a new role (copy the teacher role then remove access all groups permission) for the teachers of each group.  That way, if you need an overall teacher for the course, you can still do that.

Teachers will however be able to see all activities for every group however.  If the activities are going to be different, then Richard is right, you would be better with a separate course.