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

Return if the user is tracking the forum on mod_forum_get_forums_by_courses

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.2.1
    • Fix Version/s: 3.3
    • Component/s: Forum, Web Services
    • Labels:
    • Testing Instructions:
      Hide
      1. Create a course with a student.
      2. Create a forum with optional tracking.
      3. Enable "Mobile services": Plugins ► Web Services ► Mobile
      4. Create a Token for the student:
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      5. Next, you can do a CURL REST call simulating a WS client with the student 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 'wsfunction=mod_forum_get_forums_by_courses&wstoken=ffbe3a3002f235bf9d01fd9369e10b66' --compressed

      6. Confirm that the istracked is returned for the forum and that is set to false.
      7. As the student, navigate to student user preferences ► Forum preferences
      8. Change "Forum tracking" to "Yes..."
      9. Navigate to the forum and confirm you are tracking it (if not, enable tracking for the forum).
      10. Perform the same curl request but not check istracked is true.
      Show
      Create a course with a student. Create a forum with optional tracking. Enable "Mobile services": Plugins ► Web Services ► Mobile Create a Token for the student: Click on Site administration ► Plugins ► Web services ► Manage tokens Next, you can do a CURL REST call simulating a WS client with the student 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 'wsfunction=mod_forum_get_forums_by_courses&wstoken=ffbe3a3002f235bf9d01fd9369e10b66' --compressed Confirm that the istracked is returned for the forum and that is set to false. As the student, navigate to student user preferences ► Forum preferences Change "Forum tracking" to "Yes..." Navigate to the forum and confirm you are tracking it (if not, enable tracking for the forum). Perform the same curl request but not check istracked is true.
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_33_STABLE
    • Pull Master Branch:
      MDL-57627-master

      Description

      Now the only way to know if the user is tracking a forum is to check numunread on forums, but it can have false negatives if the user is tracking it but there are no unread items. A new field have to be returned in order to know if the user is tracking it.

      Check this comment for more information.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              pferre22 Pau Ferrer
              Reporter:
              pferre22 Pau Ferrer
              Peer reviewer:
              Juan Leyva Juan Leyva
              Integrator:
              Dan Poltawski Dan Poltawski
              Tester:
              Ryan Wyllie Ryan Wyllie
              Participants:
              Component watchers:
              Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Juan Leyva, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                15/May/17