2:
Re: locale of users from moodle integration
By: Ernie Ghiglione
|
In response to 1 | 02/10/08 04:40 PM | ||
Hi Glen,
The users in LAMS will be created with the same locale as these users have in Moodle. So if your Moodle user has a default locale German (for instance), then when created in LAMS, her default locale will be German as well. > Is there anyway around this other than logging in to lams as sysadmin and resetting each users locale? You can do this directly in the database, login directly into the mysql database and run: UPDATE lams_user SET locale_id = 3 ; The locale_id 3 is the one for Maori (mi_NZ). That will fix all users that are *already* created in LAMS (note: if you want only certain users you might want to apply some WHERE conditions to the sql statement) For all new users, since LAMS picks up the locale and language they use in Moodle, you can change the Moodle users to have Maori? Then, LAMS will create those users with default language as Maori. If this last one is not an option, you can hack the userinfo.php file in the lamstwo Moodle module so it returns to LAMS a hard coded locale. Just modify this line: $array = array('',$user->firstname,$user->lastname,$user->address,$user->city,'','',$user->country,$user->phone1,'','',$user->email,$user->country,substr($user->lang,0,2)); to $array = array('',$user->firstname,$user->lastname,$user->address,$user->city,'','',$user->country,$user->phone1,'','',$user->email,NZ,mi); Posted by Ernie Ghiglione |
|
||||||||||
|
||||||||||
|
Reply to first post on this page
Back to LAMS for Tech-Heads - General Forum