Thursday, October 13, 2016

Changing the language pack for a user - role in moodle

Yesterday, I had a moodle user say to me that enroll is spelled wrong on the site.  Deep breath....

What is interesting is that moodle is an international product, actually born with Australian roots. Moodle has a big international footprint.  You dig?

This is a informative and entertaining conversation about this.  Don't fret at the age of the post, moodle has been around a long time and the info. is still relevant.

From the conversation, I gleaned what I needed to do to change the spelling on the page in the moodle.  I actually learned about the user level setting for the language pack that moodle is using.    I I know, right?  Moodle impresses me often.  It is a bit large and a bit cumbersome in a few places, but it is feature rich.  It is the entire course building enchilada.

In other words, the selected language pack for the moodle installation, which in this case was English, is pushed to each created account.  I was able to change that setting for a specific account.  I could have changed the setting for all the accounts by simply ommitting the WHERE clause, but I did not need to.  The request from my customer was in the guest role.   A shared account.  I was just glad to find the information needed from the blog post above.

Updating the user record.

I logged into my db tool, SQLworkbench, connected to the DB and found the moodle user table.  From there edited the guest user record changing the lang field value from en to en_us_utf8

This change only effects the guest user account.  Each user account in the system has its own lang value.  Moodle, granular administration, good to the last drop.

UPDATE mdl_user
SET lang = "en_us_utf8"
WHERE username like "guest"

The end.

No comments:

Post a Comment