Prevent self enrol and navigation for a role

Prevent self enrol and navigation for a role

SAS DEN -
回帖数:2

Hi everyone,

I face a problem that I can't solve.

To give you a bit of context, I am an administrator on a moodle but I don't have access to the server or database. Our moodle is on version 3.5.
I was asked to create a role that gives the user the possibility to go in his/her courses but prevent said user from self-enrolling in others.
The self-enrol courses are in their own category, separated from other courses. We can't put a password on them.
So, in short I'd like to make a role that prevent users with a the role to go around our Moodle and enrol in courses they should not access

I tried the guest access but we'd like to keep logs with names.
I also tried to prevent the role from self enrolment but this capabilites seems to be available in moodle 3.10. Same for viewcourselist, available from 3.7.
I even tried, as a last resort, to hide a "list of categories" block for this role but I get an error message preventing me to do so ( https://docs.moodle.org/310/en/error/moodle/cannotoverridebaserole).

So is there a way that could allow me to do that ?
I thank you all for your time and your replies

回复SAS DEN

Re: Prevent self enrol and navigation for a role

Mary Cooch -
Documentation writers的头像 Moodle HQ的头像 Particularly helpful Moodlers的头像 Testers的头像 Translators的头像
As you mentioned, there new capability enrol/self-enrol which is designed to do what you want. Is it definitely not possible for you to get your site upgraded from 3.5?
回复Mary Cooch

Re: Prevent self enrol and navigation for a role

SAS DEN -
Thanks for your reply.
Sadly the IT service that manage our Moodle only want to update to an LTS...Which will be Moodle 3.9.
We'll ask to update to 3.10 and hope for the best.
At least with 3.9 I'll be able to cook someting up with the new viewcourselist capacity ...maybe.

Thanks again for your time