Deny access to/Hide participant listing when logged in

Deny access to/Hide participant listing when logged in

by Morag Hughson -
Number of replies: 4

Exactly as wished for in an old thread, I do not want students to see other students in the course navigation menu under "Participants".

That thread is closed however, and says:-

This discussion has been locked because a year has elapsed since the last post. Please start a new discussion topic.

so I could not post in there.

I have tried the solution posted by Chris Collman on that thread where he says:-

 I did not want students to see other students in the course navigation menu under "Participants".

I changed the site level permissions for all students. side administration > Users > Permisssion > Define roles > students. I found "moodle/course:viewparticipants" and set it to prevent. If I wanted an exception to this (or any) site permission policy, I would use the override function within the context I wanted.

Thus, if I wanted this to apply to only one course, then I would not change the site wide default of allow. I would use the override permission feature for that course context.

Hope this helps others. I was looking for a way in 2.1. Chris

I tried it at Prevent and Prohibit, and I also set Prohibit for the permission for Authenticated users, as that was also mentioned in the thread.

All of this to no avail. The participants of the course can still be seen.

Note: I don't care if the navigation is still there or not, I just don't want the list of participants to be shown to users.

I am using the latest moodle 3.4, on MoodleCloud, so solutions to edit the code aren't useful to me.

Can anyone help?

Cheers,
Morag

Average of ratings: -
In reply to Morag Hughson

Re: Deny access to/Hide participant listing when logged in

by Richard Evans -

I can only echo the importance of this capability being implemented.  Individual participant security and anonymity is critical to the deployment of our courses for our target demographic.  This can impact several thousand participants annually.  Without this capability, we will be unable to deploy our project - which can have a substantial impact upon the lives of our participants. 

NOTE:This is based upon both policy and regulatory requirements.

In reply to Morag Hughson

Re: Deny access to/Hide participant listing when logged in

by Randy Thornton -
Picture of Documentation writers


Morag,

This can be done easily in 3.4.0 and works properly.

Set the default Student role to have course:viewparticipants capability set to not Allow just by unchecking the Allow box.

In Boost, you won't see the Participants option on the Navdrawer at all, while in the Navigation block the Participants link is inactive and you can only click the link to yourself. This works for me also in Moodlecloud 3.4.0 with the standard Moodlecloud theme. (See screenshots both from MC.)

You should not need to set Prevent or Prohibit here, it is enough to just not allow it. And you should not change the Authenticated user role either as this capability only pertains to the course context anyway (as shown by the capability prefix 'course:').

This change affects all Students in all courses site-wide. If you do need to override this in a particular course and allow students in a course to see the Participants list, you can do so in the Course administration Participants > (gear) > Permissions and add back the Student role to the list of roles allowed this permission, just for that one course.

The thread you were reading is based on really old versions of Moodle (2..0, 2.1) so some of the info there is out of date.


Randy



Attachment screenshot_2652.jpg
Attachment screenshot_2653.jpg
Average of ratings: Useful (1)
In reply to Randy Thornton

Re: Deny access to/Hide participant listing when logged in

by Morag Hughson -

Hi Randy,

Many thanks for your reply, and especially for your screenshots because they have solved the problem for me.

I had not realised that there were TWO viewparticipants settings! Had I used the filter box as your screenshot shows instead of just using the browser text search capabilities, I might have noticed that before!

The two "viewparticipants" settings in Moodle

There is one in the System section called moodle/site:viewparticipants which is not set by default and is the one I was fiddling with; and another, which your screen shot shows, in the Course section called moodle/course:viewparticipants which defaults to "Allow". Once I unset that one, the behaviour was as hoped for. I have no idea why there are two and what the difference is, but they are now both not set on my system.

So thank you for taking the time to describe it so clearly and with the screenshots. I very much appreciate you doing that.

Cheers,
Morag

Average of ratings: Useful (1)
In reply to Morag Hughson

Re: Deny access to/Hide participant listing when logged in

by Randy Thornton -
Picture of Documentation writers


Morag,

Excellent. You are most welcome and thank you for also explaining the nature of the issue you had, as that will help others avoid that. 

The moodle/course:viewparticipants is the capability that is checked for access to the course Participant list.

On the other hand, the SITE capability, moodle/site:viewparticipants, is used at the site level to see the list of all users in various site level tools. It is set to Allow for the Manager role, so the Manager can see everybody and view all user profiles. 

(You would not usually want to allow that for all other roles, but it could be useful if you were making a custom role like a site wide auditor role, for instance.)

Also, reminder that there is a useful tool for troubleshooting such issues, the Capability overview tool in Site admin > Users > Permissions > Capability overview. It will show you for any capability exactly which permissions are set for which roles in which contexts including category and course level overrides. Very handy when things get complex ;)

Randy