Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-56765

Current language is not correctly set when a new user session is started via Web Services

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.6, 3.1.2, 3.2
    • Fix Version/s: 3.0.7, 3.1.3
    • Component/s: Web Services
    • Labels:
    • Testing Instructions:
      Hide
      1. Enable the setting: Language autodetect (autolang)
      2. Enable "Mobile services": Plugins ► Web Services ► Mobile
      3. Install an additional language in your Moodle site
      4. Enable the Multilanguage filter (and allow to apply it in header and contents)
      5. In a course, create a page Resource, add multi language in both headers and contents:

        <span class="multilang" lang="en">Multi lang page</span><span class="multilang" lang="es">Página multi idioma</span>
        

      6. Open the Moodle Mobile app
      7. Browse to the course
      8. Check that you see correctly the page resource name and contents in the current user language
      9. Force a different language for the user
      10. Pull down to refresh the page and the section list containing the page to see that the app now display the title and content in the user forced language
      11. Force a language at course level
      12. Pull down to refresh to check that the content is now displayed in the course forced language
      Show
      Enable the setting: Language autodetect (autolang) Enable "Mobile services": Plugins ► Web Services ► Mobile Install an additional language in your Moodle site Enable the Multilanguage filter (and allow to apply it in header and contents) In a course, create a page Resource, add multi language in both headers and contents: <span class="multilang" lang="en">Multi lang page</span><span class="multilang" lang="es">Página multi idioma</span> Open the Moodle Mobile app Browse to the course Check that you see correctly the page resource name and contents in the current user language Force a different language for the user Pull down to refresh the page and the section list containing the page to see that the app now display the title and content in the user forced language Force a language at course level Pull down to refresh to check that the content is now displayed in the course forced language
    • Affected Branches:
      MOODLE_30_STABLE, MOODLE_31_STABLE, MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_30_STABLE, MOODLE_31_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-56765-master

      Description

      The current language is not correctly set for the user, some SESSION variables are not unset after a new user session is created.

      This makes Moodle thinks that the user default language is the browser one, making the multi-lang filters to return always the text filtered by the browser language.

      This is happening only when the auto-detect language settings is on.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  14/Nov/16