Preventing students from viewing each other's course lists

Preventing students from viewing each other's course lists

by J Johnson -
Number of replies: 4

Hello! This is my first post, so apologies in advance if I do something incorrectly. I have also spent a couple of hours searching on my own and haven't found anything. 


Version of Moodle being used: 3.2


I am wondering if there is a way to prevent students from seeing each other's courses in their user profiles without taking away that ability for other types of users. 


Is there a way to prevent student users from seeing the Course Details block of any user profile page while still allowing other roles to view it? Or to take away the Course Profiles part of that block for them? 


Or is there some other way to accomplish this aside from disabling their permission to view the Participants list at the course level, thus preventing them from clicking on any user profiles in the first place (the problem with this is that they wouldn't be able to see their instructors' profiles either)? 


Any help would be greatly appreciated. Thank you in advance! 

Average of ratings: -
In reply to J Johnson

Re: Preventing students from viewing each other's course lists

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hello and welcome to moodle.org smile

You can prevent students from seeing each other's courses in their user profiles by selecting 'My courses' in the setting Hide user fields (hideuserfields) in the Site administration. (The quickest way to find any site admin setting is to search for it.)

Please see the documentation User policies for more details of the 'Hide user fields' setting.

Average of ratings: Useful (1)
In reply to Helen Foster

Re: Preventing students from viewing each other's course lists

by J Johnson -

Thank you. I just tried that; however, I then logged in as a student, went to one of their courses, clicked on Participants, clicked on the name of another participant and was able to see that person's full course list under Course Details/Course Profiles. 


Any ideas? 

Average of ratings: Useful (1)
In reply to J Johnson

Re: Preventing students from viewing each other's course lists

by J Johnson -

As an update, this actually worked on one Moodle site but not another. I am looking into why and will update this thread when we figure it out. Thanks very much for the solution! 

In reply to J Johnson

Re: Preventing students from viewing each other's course lists

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Could it be because you have changed some capabilities?

You are welcome to try things out on our Moodle Sandbox demo site. It resets on the hour, every hour, so it's good to log in say at 5 past the hour. You can log in as an admin and change capabilities or other settings, then in a different browser log in as a student to check how things are.

At the end of the hour, any changes you made on the site are erased, so you can try something else the next hour, or leave the site for others to play with!

Average of ratings: Useful (1)