This issue will blow your mind!

Re: This issue will blow your mind!

by Melanie Scott -
Number of replies: 4
Picture of Particularly helpful Moodlers

Your question is really about two different things:  Roles and Accounts

Roles determine what permission someone has if they are assigned it in specific contexts.  These are assigned to individual accounts.

Accounts represent people.  They are what you (or a user) will log into.

If you say a role is available at the system level, a user can be given that permission for the entire site...for every course and category in the site.

Your image above says the guest role can be enrolled at the system level (in everything).  If the guest account is assigned as guest role at the system level, it will act like the account is enrolled in everything, even though the courses won't acknowledge it as actual enrollment (look at the Other roles section of Users in a course--that's where they'll show up), the account will be able to access all courses but probably won't actually be able to participate properly because most activities/resources require you to actually have a course role to use them (system roles don't count as course roles).

In old Moodle (1.9 and before) the student role was available at all levels.  I had a lot of people give category and system level student roles to our staff and then the crying and moaning started.  Because category and system roles aren't...well, best word I've got is REAL.  The courses won't recognize them as students and won't give grades or allow some participation. This is bad.

In Moodle 2.X and above, the student role was by default only available at the course level which simplified a lot of stuff.  Some people have complained about the change but it was a positive move.  No more accidentally screwing people up.  Now you have to do it on purpose.

System roles are really for admins, managers, people who need to access all courses for management reasons.  Category roles are for those people who need access to all courses in that category and below, also for management reasons.  Course roles are for participation and teaching.  A teacher role at a category level cannot do all of the same things in a course that a teacher role in a specific course can.

Roles require a lot of attention to detail and big picture thinking.

In reply to Melanie Scott

Re: This issue will blow your mind!

by MoodleKittyCat . -

Thanks but changing the context of guest role still doesn't restrict them from entering some of the shells. I checked the permissions and they are same. It is weird as hell and when I checked the enrolled users, the guest is not even in the list. What to do?

In reply to MoodleKittyCat .

Re: This issue will blow your mind!

by Melanie Scott -
Picture of Particularly helpful Moodlers

First:  Go to one of the courses they should not have access to but do.  Rather than clicking on Users->Enrolled Users, click on Users->Other users.  Based on what you said, you will most likely see the users in this area with this information in the Roles area (on the right):  Guest (assigned at site level).

Second:  Go to Site Administration->Users->Permissions->Assign system roles.  Click on the Guest role.  You most likely have given all your students the guest role, which isn't actual enrollment but allows access to everything.  Remove them.


If you want someone to have the guest role in a course, set the course to allow guests. (Course Administration->Edit Settings-> Guest Access.  Change the setting to yes.  If you want them to have to enter a password to use guest access, add a password. Save

In reply to Melanie Scott

Re: This issue will blow your mind!

by Chris Chapman -

I'm having the same issue, I dont want them to have access to anything at all, bar a single course (which I can given them a student role for)

In reply to Chris Chapman

Re: This issue will blow your mind!

by Jon Bolton -
Picture of Particularly helpful Moodlers Picture of Testers

The Guest Enrolment method is usually added to all courses by default. If you don't want guests to access courses, turn it off. Additionally, you can prevent guest access to your whole site.

  • In Administration > Site administration > Plugins > Enrolments > Manage enrol plugins, ensure Guest access is disabled (has its eye closed.) 
  • In Administration > Site administration > Plugins > Manage authentication set the Guest login button to Hide.