-
Sub-task
-
Resolution: Fixed
-
Minor
-
2.2.6
-
MOODLE_22_STABLE
-
MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
-
w50_
MDL-36597_m25_courselang -
We upgraded our site from Moodle 1.9 to 2.2.
This issue applies to all language packs although for convenience only English is discussed here.
Steps to reproduce:
- Set course's mdl_course.lang to en_utf8 (language code format inherited from 1.9)
- Go to course's "Edit course settings" page
EXPECTED:
"Force language" displays "English (en)".
BUG:
"Force language" displays "Do not force".
On the course level, force language works. All strings are displayed in English as expected, regardless of the sitewide language settings. Unfortunately this is not reflected on the course settings page.
Apparently the dropdown on the course settings page expects the language code to be 'en', not 'en_utf8' as in version 1.9.
If lang is 'en_utf8', 'Do not force' is set in the dropdown.
This is problematic since forced language will get unset (mdl_course.lang='') when course settings are saved.
We solved this problem for our site by replacing 'en_utf8' with 'en' (all other languages accordingly) in mdl_course.lang:
UPDATE mdl_course SET lang = 'en' WHERE lang='en_utf8';
This could probably be handled automatically when upgrading Moodle to version 2.x.