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

Forum view_forum_discussion WS is not marking discussions as read when the forum is tracked

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Create a course with a student.
      2. Login as the user and enable forum tracking on the user forum preferences.
      3. Login again as the teacher or admin.
      4. Create a forum activity with the tracking enabled.
      5. Create a discussion with a couple of replies (you will need the discussion id later).
      6. Again as student, go to the discussion list of the forums and check you have discussions to be read (do not open the discussions).
      7. As admin, enable "Mobile services": Plugins ► Web Services ► Mobile
      8. Create a Token for the student user
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      9. Next, you can do a CURL REST call simulating a WS client with the student user .
        • You need to replace the wstoken, discussionid (the discussion you created id value) and the URL of your moodle instance

          curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'discussionid=16&wsfunction=mod_forum_view_forum_discussion&wstoken=ffbe3a3002f235bf9d01fd9369e10b66'

      10. As student, go to the discussion list of the forums and check now the discussion does not have any post to be read.
      Show
      Create a course with a student. Login as the user and enable forum tracking on the user forum preferences. Login again as the teacher or admin. Create a forum activity with the tracking enabled. Create a discussion with a couple of replies (you will need the discussion id later). Again as student, go to the discussion list of the forums and check you have discussions to be read (do not open the discussions). 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 with the student user . You need to replace the wstoken, discussionid (the discussion you created id value) and the URL of your moodle instance curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'discussionid=16&wsfunction=mod_forum_view_forum_discussion&wstoken=ffbe3a3002f235bf9d01fd9369e10b66' As student, go to the discussion list of the forums and check now the discussion does not have any post to be read.
    • Affected Branches:
      MOODLE_31_STABLE, MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE, MOODLE_32_STABLE
    • Pull Master Branch:
      MDL-57554-master

      Description

      When opening a discussion on web when the forum is tracked, it marks as read the discussion. Using webservices this should be done when logging using mod_forum_view_forum_discussion.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  13/Mar/17