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

    • MOODLE_31_STABLE, MOODLE_32_STABLE
    • MOODLE_31_STABLE, MOODLE_32_STABLE
    • MDL-57554-master
    • 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.

      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.

            pferre22 Pau Ferrer
            pferre22 Pau Ferrer
            Juan Leyva Juan Leyva
            Dan Poltawski Dan Poltawski
            Simey Lameze Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.