General help

Can't set site administrators - 2.6.2

 
 
Emperor Joshua Norton I, Emperor of the United States and Protector of Mexico.
Can't set site administrators - 2.6.2
 

We're using Moodle 2.6.2, and I seem to be unable to set a user as a site administrator, even when logged in with the main admin account. In the 

  • Home
  •  /  Site administration
  •  /  Users
  •  /  Permissions
  •  /  Site administrators


screen, I select the user I want to add as a site administrator, then click on the "Add" button. The confirmation screen comes up and I click on "Continue". But then when it returns to the site administrator screen, the user I selected has not been added.

This seems to be true of all user accounts that I try to add as a site administrator, not just one particular user.

I've purged all caches, just for fun. No good. I've also turned on full debugging, but no error messages are showing up at any step.

Any help, suggestions, cryptic ramblings, would be much appreciated.

TIA


 
Average of ratings: -
Mary Cooch
Re: Can't set site administrators - 2.6.2
Group Documentation writersGroup Moodle Course Creator Certificate holdersGroup Moodle HQGroup Particularly helpful MoodlersGroup TestersGroup Translators

Have you tried with a different theme?

 
Average of ratings: -
Emperor Joshua Norton I, Emperor of the United States and Protector of Mexico.
Re: Can't set site administrators - 2.6.2
 

Hi Mary. Thanks for replying.

I just tried with the Afterburner theme (we normally use the "Formal White" theme for this site). It still didn't work, and I still saw no error messages.

Richard


 
Average of ratings: -
Emperor Joshua Norton I, Emperor of the United States and Protector of Mexico.
Re: Can't set site administrators - 2.6.2
 

An update: I tried again using several different themes. Same problem with each one.

 
Average of ratings: -
Emperor Joshua Norton I, Emperor of the United States and Protector of Mexico.
Re: Can't set site administrators - 2.6.2
 

I went ahead and looked directly in the database. In the table mdl_config, I found this:


siteadmins2,54

where 54 is the ID of the user we're trying to set as a site admin (and 2 is the main admin account, of course).

So why isn't this user showing up in the list of site admins, and why don't they have admin access to the site? Again, I have turned on debugging, and nothing is showing up.

 
Average of ratings: -
Emperor Joshua Norton I, Emperor of the United States and Protector of Mexico.
Re: Can't set site administrators - 2.6.2
 

This is still a problem for us, and I still can't find a reason for the problem. Can nobody help?

 
Average of ratings: -
Gmads
Re: Can't set site administrators - 2.6.2
Group Particularly helpful MoodlersGroup Testers

Hello Richard,

Was the site a fresh new installation or an upgrade; and if the latter, from which version?

What about your environment, you haven't provided any info about it: OS, web server, db server, PHP; is it a local installation, a shared, dedicated, virtual server? Have you checked the web server error log for any possible clues? Could you provide a screenshot of the pages in question?

Given that it is or seems to be a strange issue, if I were you I would not waste much time in this; I would create a new installation, check if the problem is also present in the new one and if not, then I would just backup all courses and restore them in the new installation.

Cheers!

 
Average of ratings: -
Picture of Helen Foster
Re: Can't set site administrators - 2.6.2
Group DevelopersGroup Documentation writersGroup Moodle HQGroup Particularly helpful MoodlersGroup Testers

Hi Richard,

Is your site using MNet by any chance? If so, for security reasons, users cannot be assigned the role of admin via the Moodle interface. Please see the documentation MNet for further details.

 
Average of ratings:Useful (2)
Emperor Joshua Norton I, Emperor of the United States and Protector of Mexico.
Re: Can't set site administrators - 2.6.2
 

Hi Helen,

Thanks for replying!

I double checked to make sure MNet was not enabled on our site. It is not. Clearly, something else is going on.

Thanks again,

Richard

 
Average of ratings: -
Emperor Joshua Norton I, Emperor of the United States and Protector of Mexico.
Re: Can't set site administrators - 2.6.2
 

Hi Guillermo,

Thanks for replying, I really appreciate it!

Our OS is the latest version of CentOS, using PHP 5.17.3 and the latest version of MySQL. Apache is our web server. It's a hosted, dedicated server, and a fresh installation. We have several other 2.6.2 installations in the same environment, but none of them are experiencing this issue.

I'll talk to the client about possibly having some down time in order to replace the installation, but it's not likely since we're in the middle of the semester. This issue just appeared out of the blue.

Thanks again!

Richard


 
Average of ratings: -
Gmads
Re: Can't set site administrators - 2.6.2
Group Particularly helpful MoodlersGroup Testers

Hello Richard,

A couple of ideas, both of which have as a goal clearing the session information caches.

1. Go to the Cache administration page (Administration > Plugins > Caching > Configuration) and purge all caches where Mode has "session" as its value or one of them.

https://docs.moodle.org/26/en/Caching

Try and see if the issue is fixed. If not...

2. Go to the Session handling page (Administration > Server > Session handling) and change the value of the Use database for session information (dbsessions) option. Please notice that doing this will log out all current users (including you), so you should do it after noticing your users or at least at a time where activity is lowest. Once you log in back, go and restore the option to its original value (you will be logged off again).

https://docs.moodle.org/26/en/Session_handling

 
Average of ratings: -
Emperor Joshua Norton I, Emperor of the United States and Protector of Mexico.
Re: Can't set site administrators - 2.6.2
 

Hi Guillermo,

I tried both suggestions, but neither worked.

We don't appear to be encountering any other problems on this site (or, at least, we haven't gotten any error reports from our students and teachers). We've made no code changes and no database changes to this installation.

This is just weird.

If we can't come up with anything else, we may end up backing up the courses and reinstalling the site next week sometime.


Richard


 
Average of ratings: -
Gmads
Re: Can't set site administrators - 2.6.2
Group Particularly helpful MoodlersGroup Testers

Hello Richard,

Well, yes, that may seem to be the only solution, however, after thinking a bit about your statement, "This issue just appeared out of the blue", I'm not quite sure that would actually work. What I'm thinking is that maybe some content was added at a course or at the front page that is disrupting something. Yes, I know that this seems to be a very far-fetched possiblity, but it is actually possible: people have had problems at their installations because of a teacher pasting Word content into the HTML editor at a course. So, considering this as a possibility I would try to remember or estimate about the date this issue appeared, restore an earlier backup in a development Moodle installation and see it the issue was present; if not, I would then start restoring backups until the issue appears. Once found I would then dump both databases (the one with the issue and the previous one) and compare them; you'll, need a good UTF8 text editor for this. I know I have assumed quite a number of things, but that is what I would do if I had the required elements... backups and lots of time & patience smile

I also assumed this doesn't have anything to do with the server components themselves as you said you have other Moodle 2.6.2 installations.

Have you checked the error logs (web server, database server)? Who knows, maybe a clue could be found.

 
Average of ratings: -