Roles and permissions

Cannot remove users from system-wide Course Creator

Picture of Alick Brown
Cannot remove users from system-wide Course Creator


Using Moodle 2.1.1 (Build: 20110801)

I have given course creator role to users at category level.

They have turned up in the system-wide course creator list.
All those on the list are either admins or have been given course creator privileges lower down.
I am not able to remove them as all users with this role are greyed out in the list and cannot be selected.

System-wide Course creator

If I manually give someone a system-wide course creator role. They appear on the list normally, and can be removed.

Any ideas?

Many thanks,

Average of ratings: -
Picture of Dominic Wan
Re: Cannot remove users from system-wide Course Creator

Dear Alick,

I have the same issue, any progress on this problem?




Average of ratings: -
Picture of imketu p
Re: Cannot remove users from system-wide Course Creator

same issue any one know?

in our moodle after setup LDAP server, default all first login as a course creator and that stay as a system role and stay in gray mode cannot remove from list. 

anyone have solution?





Average of ratings: -
Jerre Cope
Re: Cannot remove users from system-wide Course Creator

I've just run across this after upgrading from 1.9

Just use the Unsupported Role Assignments tool to delete the bad role assignments.

Average of ratings: -
Picture of Jean-Luc Delghust
Re: Cannot remove users from system-wide Course Creator

I have the same problem but can't find any "course creator" unsupported assignments in the Unsupported Role Assignment tool..

We have upgraded from 1.9 to 2.3.1 and cannot remove the site-wide "course creator" role assignments. They all appear greyed out. We're setting up a new system to assign course creator role to some users, and I'd like to remove those old assignements to make sure the new one wors fine.

Also, I do have a few unsupported role assignments (course creator assigned in course context). Could anyone confirm that, when in Site administration > Users > Permissions > Unsupported role assignments, if I click the delete button, I will remove the unsupported role assignments, and not the role in its entirety? Would hate to see that happen..

TIA for any help!

Average of ratings: -
Picture of Nick Neve
Re: Cannot remove users from system-wide Course Creator

Solved at last! The cause of this problem and removing the user priveleges are two different matters.

Firstly: How they come to be site-wide course creators (here at my school anyway)... We use LDAP authentication and currently have 74 users with 'course creator' system wide role who cannot be removed and we don't want them to have the role. One has only been here a day and we didn't even know he'd arrived - that was the clue. He was on the LDAP server but we hadn't put him on Moodle.

Site administration>Plugins>Authentication>Manage authentication

Under 'Common settings' the box for 'prevent account creation when authenticating' had been left on the default unticked 'No'. This combined with the next setting (see below) caused a problem because new users on the system would click on the link to our Moodle site and would automatically be given a user account on Moodle - this is only a problem when the next setting is as follows:

Site administration>Plugins>Authentication>LDAP server

Under 'Course creator' there was an entry for 'Staff', 'Teachers' and all sorts of OUs who shouldn't have been there.

So whenever a new teacher (or member of another OU listed in this setting) clicked on the link to our Moodle site for their first time, they were automatically given a Moodle account with a site-wide course creator role.

To stop this happening anymore: leave the course creator setting blank (or just something like OU=Admins).

 Next: how to clean up the mess of unwanted course creators.

I haven't found an easy way. But what works is:

  • First make a note, for each user, of the cohorts and courses they should be in
  • Then delete that user
  • Then create a new user - same name - which will link back LDAP and they can authenticate just as before. But the new user will have a new Moodle userID. And no course creator role.
  • Then put this re-created user back in the right courses and cohorts

I did say it wasn't an easy solution. And I haven't checked to see what happens to any comments they may have made on students work, or grades they may have awarded. So be careful.

Perhaps some Moodle backend wizard can find an entry deep in the Moodle code which allows us to change the role without deleting and recreating the user?

 Many thanks to my colleague Mike who found the cause of this problem.

Average of ratings: -
Picture of Igor Rejlek
Re: Cannot remove users from system-wide Course Creator

I just had somewhat similar issue and I think I may have found a less painful workaround.

My problem: using Moodle 2.5, when you setup course  creators LDAP group in LDAP server settings, log-in as user in the LDAP group and then clean the field in LDAP settings, the user will still be course creator when he logs in again.

When creators LDAP group is changed to some other, in which the user, who formerly was creator, is not, then on his next log-in the creators privilege is revoked from him. Don't know how it behaves, when user is just removed from the LDAP group, so I cannot confirm I have very same problem like you.

My workaround: Simply delete role_assignment row in database. Seems to work. Since Moodle was developed for MySQL, I guess it wouldn't stop me if I was breaking any referential integrity (and checking all_constraints view in DB confirms it), but the installation to which I did this, seems to be working fine.

The SQL I used (written for Oracle, Moodles schema name is MOODLE_B):
delete from MOODLE_B.m_role_assignments
where id in (
  from MOODLE_B.m_user u
  join MOODLE_b.m_role_assignments ra
    on = ra.userid
  join MOODLE_B.m_role r
    on = ra.roleid
    u.username = 'username of no-more-coursre-creator'
    and r.shortname = 'coursecreator'


Average of ratings: -
Picture of Dave Stone
Re: Cannot remove users from system-wide Course Creator

I'm not is a position to run database queries to clean this up.

What would happen if I copied the 'course creator' role, then deleted the original role,
and then changed the copy's shortname to the original's shortname?

Would Moodle treat the replacement role as the original, or would it cause problems?
Maybe we should never delete the default roles?

Average of ratings: -
Picture of Dianne Volek
Re: Cannot remove users from system-wide Course Creator

When I set up Moodle, Under Site Admin > Users > Permissions > Define role I set the Course Creator Role to be allowed to have System Wide permissions. I had allocated 4 users at a system level.

Later I realised that this was insecure (even though there are only a few course creators, in the future this might not be so).  So I removed the "system level" and made it only at a Category and Course level. At this point, I could no longer see the users to remove them from the role.

I switched "System" back on as a defined context, I removed the 4 original users, and then switched the context back off.

Average of ratings: Useful (1)
Picture of Helen Foster
Re: Cannot remove users from system-wide Course Creator [Solved]
Core developersDocumentation writersMoodle HQParticularly helpful MoodlersPlugin developersTestersTranslators

Thanks Diane for posting your solution - very helpful. smile I have added a link to this discussion thread in the Course creator role documentation for others who may encounter the same problem.

Average of ratings: -