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

WS tool_mobile_get_autologin_key is not capturing moodle_exceptions

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 3.2
    • 3.2
    • Web Services
    • MOODLE_32_STABLE
    • MOODLE_32_STABLE
    • MDL-56863-master
    • 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

    Description

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

      Attachments

        Issue Links

          Activity

            People

              jleyva Juan Leyva
              jleyva Juan Leyva
              Dani Palou Dani Palou
              Dan Poltawski Dan Poltawski
              John Okely John Okely
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Clockify

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