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

Support multilang for the shibboleth login button

XMLWordPrintable

    • MOODLE_401_STABLE
    • MOODLE_405_STABLE
    • Hide
      1. Log in as admin
      2. Navigate to Plugins > Filters > Manage filters in site administration
        • Multi-language content: On, applies to Content and headings
      3. Navigate to Plugins > Authentication > Manage authentication in site adminstration
        • Shibboleth: Enabled
      4. Press Settings for Shibboleth
        • Username: test
        • Authentication method name:

          <span class="multilang" lang="en">Login (EN)</span><span class="multilang" lang="de">Login (DE)</span>
          

          and press "Save changes"

      5. Log out
      6. Navigate to login page
      7. Confirm you see "Login (EN)" under the Log in using your account on: heading (e.g. multilang content is filtered correctly)
      8. Manually navigate to the following URL:

        <WWWROOT>/auth/shibboleth/login.php
        

      9. Confirm you see "Login (EN)" in the page heading (e.g. multilang content is filtered correctly)
      Show
      Log in as admin Navigate to Plugins > Filters > Manage filters in site administration Multi-language content: On , applies to Content and headings Navigate to Plugins > Authentication > Manage authentication in site adminstration Shibboleth: Enabled Press Settings for Shibboleth Username: test Authentication method name: <span class="multilang" lang="en">Login (EN)</span><span class="multilang" lang="de">Login (DE)</span> and press "Save changes" Log out Navigate to login page Confirm you see "Login (EN)" under the Log in using your account on: heading (e.g. multilang content is filtered correctly) Manually navigate to the following URL: <WWWROOT>/auth/shibboleth/login.php Confirm you see "Login (EN)" in the page heading (e.g. multilang content is filtered correctly)

      The label on the Shibboleth authentication login button is configurable but multilang text is not supported, while it is supported for CAS authentication.

      This problem is fixed by replacing the line in function loginpage_idp_list() in auth/shibboleth/auth.php:

              $result[] = ['url' => $url, 'iconurl' => $iconurl, 'name' => $config->login_name];
      

      with the line:

              $result[] = ['url' => $url, 'iconurl' => $iconurl, 'name' => format_string($config->login_name)];
      

       

      Reproduction Steps:

      1. Make sure multilang filter is enabled and a lang pack (say German) is installed.
      2. Enable Shibboleth authentication in "Site administration" > "Plugins" > "Authentication" > "Manage authentication" page.
      3. In the Shibboleth settings page, Enter any dummy word into the "Username" field, and "Shibboleth Login <span class="multilang" lang="en">(EN)</span><span class="multilang" lang="de">(DE)</span>" into the "Authentication method name" field, then click "Save changes".
      4. Log out, then visit the login page.
      5. You see "Shibboleth Login <span class="multilang" lang="en">(EN)</span><span class="multilang" lang="de">(DE)</span>" button in the "Log in using your account on:" section.

            pholden Paul Holden
            kagotani Hiroto Kagotani
            Luca Bösch Luca Bösch
            Huong Nguyen Huong Nguyen
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 42 minutes
                42m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.