Moodle 2 - Cannot change default role from authenticated user

Moodle 2 - Cannot change default role from authenticated user

by James Speake -
Number of replies: 13

I'm desparately trying to change the default role for all users in Moodle 2 from Authenticated User to Student, however I only have one option for authenticated user in the drop down on the User Policies page. As far as I know I should be able to change the default role, but have no idea how to make other roles appear in the drop down.

Any help would be much appreciated.

Cheers

James

Average of ratings: Useful (1)
In reply to James Speake

Re: Moodle 2 - Cannot change default role from authenticated user

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I had a look at the code that generates that list. It has that look of a nasty kludge and is not commented at all (Grrrrrrr.....). However, the student role (or 'archetype' to be exact) is specifically excluded from the list. You would need to copy (clone) the student role into a new role because all newly created roles will be on the list.

I imagine that this is some sort of security/safety feature but I can't think what.

Oh well... MDL-26805
Average of ratings: Useful (1)
In reply to Howard Miller

Re: Moodle 2 - Cannot change default role from authenticated user

by Ramo Karahasan -

Hi Howard,

that's not working for me. I've copied the studen role to a new one, called "student cus" and changed some capabilities. if i try to configure the default role for a new user i came to the same issue as Helen mentioned here: http://tracker.moodle.org/browse/MDL-26805

Any hints for a workaround?

Cheers,

Ramo

In reply to Ramo Karahasan

Re: Moodle 2 - Cannot change default role from authenticated user

by Timothy Shelton -

Hi Ramo

I have the same problem - did you ever find a solution??

In reply to Timothy Shelton

Re: Moodle 2 - Cannot change default role from authenticated user

by Chris Egle -

You can change it by going to Site administration->Users->Permissions-> User Policies.

Look for Default role for all users.

Please read what is underneath the setting as this is in addition to any role a student might have in a course.

I'm guessing that you really want to take a look at the enrollment/enrolment roles for courses.

For course defaults, look for your enrollment plugin that you're using and change the default role there. For the manual enrollment plugin, go to:

Site administration->Plugins->Enrollments->Manual enrolments

 

Does that make sense?

In reply to Chris Egle

Re: Moodle 2 - Cannot change default role from authenticated user

by Timothy Shelton -

Hi Chris

Thanks for your reply.  Underneath user policys / default role for all users which authenticated user can only be selected it says :

All logged in users will be given the capabilities of the role you specify here, at the site level, in ADDITION to any other roles they may have been given. The default is the Authenticated user role (or Guest role in older versions). Note that this will not conflict with other roles they have, it just ensures that all users have capabilities that are not assignable at the course level (eg post blog entries, manage own calendar, etc).

When I go to Site administration->Plugins->Enrollments->Manual enrolments I get the options to enrol as GUEST / NON-EDITING TEACHER / TEACHER / MANAGER - student isn't an option.

Any ideas how I can get student into that list?  Thanks

Tim

In reply to Timothy Shelton

Re: Moodle 2 - Cannot change default role from authenticated user

by Chris Egle -

It looks like you no longer have a student role.  Have you tried creating one?  You can do this under Site administration->Users->Permissions-> Define roles.  Even if you do have a student role, you can create a new one. You'll want to make sure that the Role archetype is set to student. That will ensure that the permissions will be set appropriately.  Under Context types where this role may be assigned, you'll want to check Course and Activity module; that's what is set in a traditional student role.

HTH, Chris

In reply to Chris Egle

Re: Moodle 2 - Cannot change default role from authenticated user

by Timothy Shelton -

That's fantastic.  Thank you so much for that heads up.  An alternative I've just also discovered is that if I do a bulk upload of users they appear as students (???!!!!!) so that could be the way forward if I'm not doing individual manual enrolment.

Thanks for your help

Tim

In reply to Chris Egle

Re: Moodle 2 - Cannot change default role from authenticated user

by Rob Skeet -

Hi folks, I'm losing hair on this one.

I am using Moodle 2.3.1 and have a moodle site with only one course. I want people to self register and automatically be enrolled in the course.  under Site administration Users Permissions User policies Default role for all users, I only have Authenticated user as an option.  I tried to duplicate the student role and called it participant but it still does not show under Default role for all users.  How do I assign Student to Default role for all users?  Any help would be greatly appreciated!

In reply to Rob Skeet

Re: Changing default role for all users from authenticated user

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 Rob,

To have student listed as a possible default role for all users, you need to edit the role of student in Settings > Site administration > Users > Permissions > Define roles and set the role archetype to none and for 'Context types where this role may be assigned' tick System. However, it is not recommended that you do this, as explained in MDL-26805.

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

Re: Changing default role for all users from authenticated user

by Rob Skeet -

Thanks Helen, that worked in terms of being able to set Student as a default role. but it still makes a new user have to "enrol" before taking a course

as I mentioned I want users to self register and take the course. (there is only one course) enrolling is an extra step that I'd prefer them to not have to do.

Does that make sense?

also, I'm puzzled that everywhere on the blogs it says if the default role is set to student then they are automatically enrolled in all courses. but that doessn't seem to be the case in 2.3.2

Thanks for your advice

 

Rob

In reply to Rob Skeet

Re: Changing default role for all users from authenticated user

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Rob - if you have made the student role available in the system context, then try searching for and allowing the capability moodle/course:view as well.

Average of ratings: Useful (1)
In reply to Mary Cooch

Re: Changing default role for all users from authenticated user

by Rob Skeet -

Thanks Mary you're the best!.  Setting default to student made all my front page resources dissapear (?) but instead, I just set moodle/course:view to "allow" for the authenticated user role and all is well with the world.  Thank you  both!!!

In reply to Mary Cooch

Re: Changing default role for all users from authenticated user

by Rob Skeet -

oops, spoke too soon.

if I had it set to Authenticated User then it wouldn't track their progress in the course.  I did as you said and then allowed permissions on the front page resources for students and then all was well.  Thanks again. 

Rob