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

MyMobile theme bug with external authentication

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2
    • Fix Version/s: 2.2.1
    • Component/s: Themes
    • Labels:
    • Environment:
      N/A
    • Database:
      Any
    • Testing Instructions:
      Hide

      [To test this properly you need an external SSO system like CAS. However I have had our testers do this at LUNS, so it can be tested without this by]

      1/ Switching site to the MyMobile theme (especially on Mobile device but not necessary)
      2/ Ensuring that you can login and logout through the various login links round the page (top right hand corner, bottom of page etC)

      Show
      [To test this properly you need an external SSO system like CAS. However I have had our testers do this at LUNS, so it can be tested without this by] 1/ Switching site to the MyMobile theme (especially on Mobile device but not necessary) 2/ Ensuring that you can login and logout through the various login links round the page (top right hand corner, bottom of page etC)
    • Workaround:
      Hide

      I found out that if I add the data-ajax="false" attribute to the login link tag it fixes the issue. This can be found in the MyMobile renderers.php file on line 342. I tested this workaround with CAS enabled and disabled. It works both ways so it should be a safe fix.

      After the fix, line 342:

      $loggedinas = '<a data-role="button" data-icon="alert" data-ajax="false" class="ui-btn-right nolog" href="'.$loginurl.'" data-prefetch>'.get_string('login').'</a>';

      Show
      I found out that if I add the data-ajax="false" attribute to the login link tag it fixes the issue. This can be found in the MyMobile renderers.php file on line 342. I tested this workaround with CAS enabled and disabled. It works both ways so it should be a safe fix. After the fix, line 342: $loggedinas = '<a data-role="button" data-icon="alert" data-ajax="false" class="ui-btn-right nolog" href="'.$loginurl.'" data-prefetch>'.get_string('login').'</a>';
    • Affected Branches:
      MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      In Moodle 2.2, the MyMobile theme cannot handle external authentication. This is because it tries to use Ajax when loading the login page. This works great if it uses internal Moodle authencation. However, it doesn't work so great when trying to get external authentication systems such as CAS.

      Replication steps:

      1. Setup and activate CAS authencation.
      2. Navigate to Moodle on mobile device (with MyMobile theme activated).
      3. Tap "Login"
        Receive error message.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    9/Jan/12