Details

    • Testing Instructions:
      Hide
      1. Install Moodle 1.9, install a lang pack (french)
      2. Create some courses and set the course language to french
      3. Upgrade to 2.2
      4. Verify that the courses have been upgraded and the french language is set

      For testing >2.2 :
      1/ before upgrade edit the course table to contain en_utf8 in lang fields
      2/ upgrade
      3/ verify the _utf8 was stripped

      Show
      Install Moodle 1.9, install a lang pack (french) Create some courses and set the course language to french Upgrade to 2.2 Verify that the courses have been upgraded and the french language is set For testing >2.2 : 1/ before upgrade edit the course table to contain en_utf8 in lang fields 2/ upgrade 3/ verify the _utf8 was stripped
    • Affected Branches:
      MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      w50_MDL-36597_m25_courselang

      Description

      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.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  14/Jan/13