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

The webservice function core_user_update_user always returns an exception message

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 2.2.1
    • Fix Version/s: STABLE backlog
    • Component/s: Web Services
    • Labels:
    • Environment:
      Linux, with pt-BR locale
    • Database:
      Any
    • Testing Instructions:
      Hide

      in linux:
      curl -d "wstoken=XXX&wsfunction=core_user_update_users&users[0][id]=ID" http://localhost/moodle/webservice/rest/server.php

      where XXX is yours token number, and ID it's the user id

      Show
      in linux: curl -d "wstoken=XXX&wsfunction=core_user_update_users&users [0] [id] =ID" http://localhost/moodle/webservice/rest/server.php where XXX is yours token number, and ID it's the user id
    • Workaround:
      Hide

      Create a local web service with the correct returns function!

      Show
      Create a local web service with the correct returns function!
    • Affected Branches:
      MOODLE_22_STABLE

      Description

      The webservice function "core_user_update_user" always returns an exception message because the return function (update_users_returns() in user/externallib.php) it's not return external_description, it's not following the external API

      I think that all web service functions that not need to return values has this error

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              bozohrj Carlos Alexandre S. da Fonseca created issue -
              bozohrj Carlos Alexandre S. da Fonseca made changes -
              Field Original Value New Value
              Labels Web Webservice update users
              Hide
              salvetore Michael de Raadt added a comment -

              Thanks for reporting that.

              Show
              salvetore Michael de Raadt added a comment - Thanks for reporting that.
              salvetore Michael de Raadt made changes -
              Fix Version/s STABLE backlog [ 10463 ]
              Labels Web Webservice update users triaged
              Hide
              jerome Jérôme Mouneyrac added a comment -

              If I remember the REST server was fixed recently about the null value. What version do you have? You should have this : https://github.com/moodle/moodle/blob/master/webservice/rest/locallib.php#L88-92

              Show
              jerome Jérôme Mouneyrac added a comment - If I remember the REST server was fixed recently about the null value. What version do you have? You should have this : https://github.com/moodle/moodle/blob/master/webservice/rest/locallib.php#L88-92
              Hide
              bozohrj Carlos Alexandre S. da Fonseca added a comment -

              2011120501.00, in version.php

              Show
              bozohrj Carlos Alexandre S. da Fonseca added a comment - 2011120501.00, in version.php
              Hide
              jerome Jérôme Mouneyrac added a comment -

              From the version number it seems you don't have the fix. Can you check that you have the lines mentioned in the previous comment?

              Show
              jerome Jérôme Mouneyrac added a comment - From the version number it seems you don't have the fix. Can you check that you have the lines mentioned in the previous comment?
              Hide
              bozohrj Carlos Alexandre S. da Fonseca added a comment -

              The version (2011120501.00), dont't have.

              Show
              bozohrj Carlos Alexandre S. da Fonseca added a comment - The version (2011120501.00), dont't have.
              Hide
              jerome Jérôme Mouneyrac added a comment -

              Hi Carlos,
              you can get update your Moodle site to the last version, or if not possible, you can get the fix from github (https://github.com/moodle/moodle/commit/2ada59b759fc1088e8d5ab7e287bfd8669ab7b23). It will resolve your problem.
              I'm closing the issue as it has been resolved.
              Cheers.

              Show
              jerome Jérôme Mouneyrac added a comment - Hi Carlos, you can get update your Moodle site to the last version, or if not possible, you can get the fix from github ( https://github.com/moodle/moodle/commit/2ada59b759fc1088e8d5ab7e287bfd8669ab7b23 ). It will resolve your problem. I'm closing the issue as it has been resolved. Cheers.
              jerome Jérôme Mouneyrac made changes -
              Status Open [ 1 ] Closed [ 6 ]
              Resolution Duplicate [ 3 ]
              jerome Jérôme Mouneyrac made changes -
              Link This issue duplicates MDL-31077 [ MDL-31077 ]

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: