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

Messages external functions fail when trying to retrieve information for deleted or the noreply user

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.9
    • Fix Version/s: 2.8.7, 2.9.1
    • Component/s: Messages
    • Labels:
    • Testing Instructions:
      Hide
      1. As admin or teacher, create a course with an assignment with online text submissions enabled
      2. As student, in your messaging options enable "Popup notifications" for the assignment module.
      3. As the same student, submit some text in the assignment
      4. As admin, enable "Mobile services": Plugins ► Web Services ► Mobile
      5. Create a Token for the student user:
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      6. Next, you can do a CURL REST call simulating a WS client.
        • You need to replace the wstoken and URL.

          curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'wsfunction=core_message_get_contacts&wstoken=ffbe3a3002f235bf9d01fd9369e10b66&moodlewssettingfilter=true'

          Note, you can use jsonlint.com to validate and format the json returned string or append "| python -m json.tool" to automatically format the command output

      7. Confirm that
        • The json returned displays the noreplyuser (-10) in the strangers array
      Show
      As admin or teacher, create a course with an assignment with online text submissions enabled As student, in your messaging options enable "Popup notifications" for the assignment module. As the same student, submit some text in the assignment As admin, enable "Mobile services": Plugins ► Web Services ► Mobile Create a Token for the student user: Click on Site administration ► Plugins ► Web services ► Manage tokens Next, you can do a CURL REST call simulating a WS client. You need to replace the wstoken and URL. curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'wsfunction=core_message_get_contacts&wstoken=ffbe3a3002f235bf9d01fd9369e10b66&moodlewssettingfilter=true' Note, you can use jsonlint.com to validate and format the json returned string or append "| python -m json.tool" to automatically format the command output Confirm that The json returned displays the noreplyuser (-10) in the strangers array
    • Affected Branches:
      MOODLE_29_STABLE
    • Fixed Branches:
      MOODLE_28_STABLE, MOODLE_29_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-50459-master

      Description

      Same problem that the one fixed here: MDL-49763
      Currently it happens in: get_contacts, search_contacts and get_blocked_users

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  6/Jul/15