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

New Web Service core_message_get_user_message_preferences

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1.2
    • Fix Version/s: 3.2
    • Component/s: Messages
    • Labels:
    • Testing Instructions:
      Hide
      1. As admin, enable "Mobile services": Plugins ► Web Services ► Mobile
      2. Create a Token for one user:
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      3. With this user configure your message preferences (only message, not notifications)
      4. Next, you can do a CURL REST call simulating a WS client with the user.
        • You need to replace the wstoken and the URL of your moodle instance

          curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'userid=0&wsfunction=core_message_get_user_message_preferences&wstoken=ffbe3a3002f235bf9d01fd9369e10b66' | python -m "json.tool"

      5. Check that the configuration for the processor is correct (online and offline) for the messaging preferences
      6. Check that you receive also the blocknoncontacts " Prevent non-contacts from messaging me" preference with correct values
      Show
      As admin, enable "Mobile services": Plugins ► Web Services ► Mobile Create a Token for one user: Click on Site administration ► Plugins ► Web services ► Manage tokens With this user configure your message preferences (only message, not notifications) Next, you can do a CURL REST call simulating a WS client with the user. You need to replace the wstoken and the URL of your moodle instance curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'userid=0&wsfunction=core_message_get_user_message_preferences&wstoken=ffbe3a3002f235bf9d01fd9369e10b66' | python -m "json.tool" Check that the configuration for the processor is correct (online and offline) for the messaging preferences Check that you receive also the blocknoncontacts " Prevent non-contacts from messaging me" preference with correct values
    • Affected Branches:
      MOODLE_31_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-56666-master

      Description

      In 3.2 the messaging preferences have been split in:

      • Notification preferences
      • Message preferences

      We already implemented a WS to retrieve notification preferences in MDL-55393 but we didn't notice that we were missing the "Message" ones because of the split.

      We'd need this new WS in order to enabling changing these preferences from the mobile app (it make totally sense to be able to configure what type of notifications you want to receive in Mobile)

        Attachments

          Activity

            People

            Assignee:
            jleyva Juan Leyva
            Reporter:
            jleyva Juan Leyva
            Peer reviewer:
            Dani Palou
            Integrator:
            David Monllaó
            Tester:
            Adrian Greeve
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

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