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

New Web Service mod_feedback_get_feedbacks_by_courses

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Create two feedback activities. One with the default settings including some images in the description, another one with the default settings but not visible.
      2. Enable "Mobile services": Plugins ► Web Services ► Mobile
      3. Create a Token for one teacher and one student enrolled in the course:
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      4. Next, you can do a couple of CURL REST call simulating a WS client with the teacher and the student user .
        • You need to replace the wstoken, courseid and the URL of your moodle instance

          curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'courseids%5B0%5D=18&wsfunction=mod_feedback_get_feedbacks_by_courses&wstoken=12a2a65aeea2a177055e233f9e303218&moodlewssettingfilter=true' | python -m "json.tool"

      5. Confirm that
        • As student you don't see the non-visible feedback but you see the other one. You can see the basic fields like, id, course, coursemodule, autonumbering, intro, introformat, introfiles (listing the images in the feedback description), completionsubmit, page_after_submitformat, publish_stats
        • As a teacher you see all the feedbacks including extra information like anonymous, email_notification, site_after_submit, page_after_submit, timeopen, timeclose, timemodified, pageaftersubmitfiles
      Show
      Create two feedback activities. One with the default settings including some images in the description, another one with the default settings but not visible. Enable "Mobile services": Plugins ► Web Services ► Mobile Create a Token for one teacher and one student enrolled in the course: Click on Site administration ► Plugins ► Web services ► Manage tokens Next, you can do a couple of CURL REST call simulating a WS client with the teacher and the student user . You need to replace the wstoken, courseid and the URL of your moodle instance curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'courseids%5B0%5D=18&wsfunction=mod_feedback_get_feedbacks_by_courses&wstoken=12a2a65aeea2a177055e233f9e303218&moodlewssettingfilter=true' | python -m "json.tool" Confirm that As student you don't see the non-visible feedback but you see the other one. You can see the basic fields like, id, course, coursemodule, autonumbering, intro, introformat, introfiles (listing the images in the feedback description), completionsubmit, page_after_submitformat, publish_stats As a teacher you see all the feedbacks including extra information like anonymous, email_notification, site_after_submit, page_after_submit, timeopen, timeclose, timemodified, pageaftersubmitfiles
    • Affected Branches:
      MOODLE_29_STABLE, MOODLE_33_STABLE
    • Fixed Branches:
      MOODLE_33_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-50538-master

      Description

      Retrieve a list of feedbacks from several courses

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jleyva Juan Leyva
                Reporter:
                ccito Costantino Cito
                Peer reviewer:
                Pau Ferrer
                Integrator:
                Eloy Lafuente (stronk7)
                Tester:
                Marina Glancy
                Participants:
                Component watchers:
                Amaia Anabitarte, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón, 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:
                  15/May/17