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

External function get_forum_discussion_post does not return posts correctly for qanda forums

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Create a course with a enrolled teacher and student
      2. Create a "Q&A" forum
      3. As teacher, post there a message
      4. As one student, reply to the teacher message (maybe you will have to wait like 30 minutes to be able to reply)
      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 with the student user .
        • You need to replace the wstoken, discussionid (the teacher discussion id) and the URL of your moodle instance

          curl 'http://prototype.moodle.net/mobile/moodle29/webservice/rest/server.php?moodlewsrestformat=json' --data 'discussionid=30&wsfunction=mod_forum_get_forum_discussion_posts&wstoken=2bad27dc1d9855b84a78db8623dd82c7&moodlewssettingfilter=true' --compressed

          Note: you can append | python -m "json.tool" to see the command output formatted

      7. Confirm that
        • You can see the original post and reply details
      Show
      Create a course with a enrolled teacher and student Create a "Q&A" forum As teacher, post there a message As one student, reply to the teacher message (maybe you will have to wait like 30 minutes to be able to reply) 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 teacher discussion id) and the URL of your moodle instance curl 'http://prototype.moodle.net/mobile/moodle29/webservice/rest/server.php?moodlewsrestformat=json' --data 'discussionid=30&wsfunction=mod_forum_get_forum_discussion_posts&wstoken=2bad27dc1d9855b84a78db8623dd82c7&moodlewssettingfilter=true' --compressed Note: you can append | python -m "json.tool" to see the command output formatted Confirm that You can see the original post and reply details
    • Affected Branches:
      MOODLE_29_STABLE
    • Fixed Branches:
      MOODLE_28_STABLE, MOODLE_29_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-50493-master

      Description

      This was discovered while working on MDL-50489

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jleyva Juan Leyva
                Reporter:
                jleyva Juan Leyva
                Peer reviewer:
                Adrian Greeve
                Integrator:
                Andrew Nicols
                Tester:
                Jetha Chan
                Participants:
                Component watchers:
                Andrew Nicols, Mathew May, Michael Hawkins, Shamim Rezaie, Simey Lameze, Juan Leyva, Jake Dallimore, Jun Pataleta, Ryan Wyllie
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  14/Sep/15