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

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.9
    • 2.8.7, 2.9.1
    • Messages
    • MOODLE_29_STABLE
    • MOODLE_28_STABLE, MOODLE_29_STABLE
    • MDL-50459-master
    • 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

    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

              jleyva Juan Leyva
              jleyva Juan Leyva
              Ankit Agarwal Ankit Agarwal
              Andrew Lyons Andrew Lyons
              Frédéric Massart Frédéric Massart
              David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                6/Jul/15