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

The LTI consumer does not pass the user's locale if the course locale is not enforced

    Details

    • Testing Instructions:
      Hide

      1. Setup a Moodle space with no enforced locale.
      2. Enrol a user in that space, with es as their locale
      3. Add an external tool to the space
      4. Login as the Spanish user and click on the tool

      What should happen is that the tool should show up in Spanish.

      Show
      1. Setup a Moodle space with no enforced locale. 2. Enrol a user in that space, with es as their locale 3. Add an external tool to the space 4. Login as the Spanish user and click on the tool What should happen is that the tool should show up in Spanish.
    • Affected Branches:
      MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
    • Pull Master Branch:

      Description

      The LTI consumer does not pass the user's locale if the course locale is not enforced. Currently, the course locale is passed if set, and, if not, the default system locale is set instead.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            salvetore Michael de Raadt added a comment -

            Thanks for reporting that and providing a fix.

            Chris: It would be great if you could peer review this and push to integration.

            Show
            salvetore Michael de Raadt added a comment - Thanks for reporting that and providing a fix. Chris: It would be great if you could peer review this and push to integration.
            Hide
            bushido Mark Nielsen added a comment -

            Hi Adrian, I believe that current_language() is a better way to get the current language.

            Show
            bushido Mark Nielsen added a comment - Hi Adrian, I believe that current_language() is a better way to get the current language.
            Hide
            adrian.r.fish@gmail.com Adrian Fish added a comment -

            Agreed. I didn't know that existed, so thanks for the pointer. I'm very new to Moodle coding

            Show
            adrian.r.fish@gmail.com Adrian Fish added a comment - Agreed. I didn't know that existed, so thanks for the pointer. I'm very new to Moodle coding
            Hide
            adrian.r.fish@gmail.com Adrian Fish added a comment -

            I've updated my branch, same details as before.

            Show
            adrian.r.fish@gmail.com Adrian Fish added a comment - I've updated my branch, same details as before.
            Hide
            bushido Mark Nielsen added a comment -

            This looks good to me, just cannot push it past peer review.

            Show
            bushido Mark Nielsen added a comment - This looks good to me, just cannot push it past peer review.
            Hide
            samhemelryk Sam Hemelryk added a comment -

            Thanks Adrian, this has been integrated now.

            Show
            samhemelryk Sam Hemelryk added a comment - Thanks Adrian, this has been integrated now.
            Hide
            adrian.r.fish@gmail.com Adrian Fish added a comment -

            No worries. Not exactly a substantial change

            Show
            adrian.r.fish@gmail.com Adrian Fish added a comment - No worries. Not exactly a substantial change
            Hide
            phalacee Jason Fowler added a comment -

            I've tested this with the LTI mentioned in the Moodle QA for LTI, and it would seem that the locale only matters if the LTI supports locales too, as the tool detailed in the QA test does not change language. I've tested this in Spanish and French, and the LTI does not change language. It does not cause any errors however, so I am passing this. If any further work is required, the issue may be re-opened.

            Show
            phalacee Jason Fowler added a comment - I've tested this with the LTI mentioned in the Moodle QA for LTI, and it would seem that the locale only matters if the LTI supports locales too, as the tool detailed in the QA test does not change language. I've tested this in Spanish and French, and the LTI does not change language. It does not cause any errors however, so I am passing this. If any further work is required, the issue may be re-opened.
            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:
                3 Start watching this issue

                Dates

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