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

WS tool_mobile_get_autologin_key is not capturing moodle_exceptions

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.2
    • Fix Version/s: 3.2
    • Component/s: Web Services
    • Labels:
    • Testing Instructions:
      Hide
      1. As admin, enable "Mobile services": Plugins ► Web Services ► Mobile
      2. Create a new user account (witout any special privilege)
      3. Get a normal token and private token via this URL (https required, you can mock your local is_https() if you want): https://localhost/m/stable_master/login/token.php?username=u22&password=u22&service=moodle_mobile_app
      4. As admin, edit the user, and force it to change its password.
      5. Call this WS via curl command, please, replace the token and privatetoken values with the ones from step 3.

        curl 'https://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'privatetoken=5A69Msd6nlwVCkkcRZWk9luSvAJvzhNBopfBRYn0dFbqD7DoIia6YhyTetihH4a4&wsfunction=tool_mobile_get_autologin_key&wstoken=a853b7528eac30eb9d5d3ef5c26980d9'

      6. You will get as response a key and the autologin url
      Show
      As admin, enable "Mobile services": Plugins ► Web Services ► Mobile Create a new user account (witout any special privilege) Get a normal token and private token via this URL (https required, you can mock your local is_https() if you want): https://localhost/m/stable_master/login/token.php?username=u22&password=u22&service=moodle_mobile_app As admin, edit the user, and force it to change its password. Call this WS via curl command, please, replace the token and privatetoken values with the ones from step 3. curl 'https://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'privatetoken=5A69Msd6nlwVCkkcRZWk9luSvAJvzhNBopfBRYn0dFbqD7DoIia6YhyTetihH4a4&wsfunction=tool_mobile_get_autologin_key&wstoken=a853b7528eac30eb9d5d3ef5c26980d9' You will get as response a key and the autologin url
    • Affected Branches:
      MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-56863-master

      Description

      The catch is not working, the exception in the catch needs the same type that the one thrown

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jleyva Juan Leyva
                Reporter:
                jleyva Juan Leyva
                Peer reviewer:
                Dani Palou
                Integrator:
                Dan Poltawski
                Tester:
                John Okely
                Participants:
                Component watchers:
                Juan Leyva, Jake Dallimore, Jun Pataleta
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  5/Dec/16