Role specific access to the courses

Role specific access to the courses

by Garima Sharma -
Number of replies: 1
Hi All,

I need my courses to be accessible to specific roles only. For this i override permissions for that specific role, for ex. for Authorized Users, i want not to access them Course 'TEST COURSE' , so using assign role , i would override permissions for 'moodle/course:view' capability to 'PREVENT' for 'authorized users'.

Problem is when a authorized users access 'TEST COURSE" the notice_yesno box ("You are about to enrol yourself as a member of this course.")appears again n again on click of Yes, well it should say some message that i am not allowed to view this course, but code goes into this loop again and again.

PLease help me in resolving this problem.
Average of ratings: -
In reply to Garima Sharma

Re: Role specific access to the courses

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
Hi Garima,

You can't set up role-specific access to courses because the roles system in Moodle wasn't designed to control access to courses. Instead Enrolment plugins are used for managing course enrolment. You can also set an Enrolment key.