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

            Hide
            poltawski Dan Poltawski added a comment -

            Thanks a lot for the clear report

            Show
            poltawski Dan Poltawski added a comment - Thanks a lot for the clear report
            Hide
            skodak Petr Skoda added a comment -

            To integrators: I did not bother with escaping of special character "_" in LIKE, it would still work if it matches any extra char.

            Thanks for the report.

            Show
            skodak Petr Skoda added a comment - To integrators: I did not bother with escaping of special character "_" in LIKE, it would still work if it matches any extra char. Thanks for the report.
            Hide
            poltawski Dan Poltawski added a comment -

            Hi Petr,

            Please could you rebase this - I was fixing the version numbers myself, but then got too lazy to do all 4 branches.

            Show
            poltawski Dan Poltawski added a comment - Hi Petr, Please could you rebase this - I was fixing the version numbers myself, but then got too lazy to do all 4 branches.
            Hide
            poltawski Dan Poltawski added a comment -

            (cos it automerged 23 and 22 and didn't do the version numbers etc etc)

            Show
            poltawski Dan Poltawski added a comment - (cos it automerged 23 and 22 and didn't do the version numbers etc etc)
            Hide
            cibot CiBoT added a comment -

            Moving this reopened issue out from current integration. Please, re-submit it for integration once ready.

            Show
            cibot CiBoT added a comment - Moving this reopened issue out from current integration. Please, re-submit it for integration once ready.
            Hide
            poltawski Dan Poltawski added a comment -

            Integrated, thanks Petr.

            Show
            poltawski Dan Poltawski added a comment - Integrated, thanks Petr.
            Hide
            dmonllao David Monllaó added a comment -

            It passes, the mdl_course->lang field value changes to 'fr'. The course language is displayed in French when I install the 2.x language pack.

            Tested with 22, 23 and master

            Show
            dmonllao David Monllaó added a comment - It passes, the mdl_course->lang field value changes to 'fr'. The course language is displayed in French when I install the 2.x language pack. Tested with 22, 23 and master
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Changes are now upstream, thanks for your collaboration!

            If you are going to have any celebration next days, enjoy with your gang, if not, too!

            Ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Changes are now upstream, thanks for your collaboration! If you are going to have any celebration next days, enjoy with your gang, if not, too! Ciao

              People

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

                Dates

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