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

Allow user profile picture update in webservices (user_update_users)

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.9.2, 3.2
    • Fix Version/s: 3.2
    • Component/s: User management
    • Labels:
    • Testing Instructions:
      Hide

      Unit tests additions confirm that a user picture is set in the database.

      1. Ensure webservices is enabled (Site Administration > Advanced features), select "Enable Webservices".
      2. Setup a webservices in Moodle (Site Administration > Plugins > Webservices > External Service), ensure "can upload files" is selected.
      3. Turn on the json protocol (Site Administration > Plugins > Webservices > Manage protocols)
      4. Create a token (Site Administration > Plugins > Webservices > Manage protocols)
      5. Clone git@github.com:mr-russ/sample-ws-clients.git
      6. cd sample-ws-clients/PHP-REST
      7. Update client.php with your moodle url and token.
      8. Run php client.php
      9. Load moodle and check the Admin user profile now has the moodle icon as their profile picture.
      Show
      Unit tests additions confirm that a user picture is set in the database. Ensure webservices is enabled (Site Administration > Advanced features), select "Enable Webservices". Setup a webservices in Moodle (Site Administration > Plugins > Webservices > External Service), ensure "can upload files" is selected. Turn on the json protocol (Site Administration > Plugins > Webservices > Manage protocols) Create a token (Site Administration > Plugins > Webservices > Manage protocols) Clone git@github.com:mr-russ/sample-ws-clients.git cd sample-ws-clients/PHP-REST Update client.php with your moodle url and token. Run php client.php Load moodle and check the Admin user profile now has the moodle icon as their profile picture.
    • Affected Branches:
      MOODLE_29_STABLE, MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      When updating a user via webservices, there is no option available to submit a profile picture.

      You should be able to submit a profile picture to the webservice and it will update the user picture.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

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