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

New Web Service mod_feedback_get_feedbacks_by_courses

    XMLWordPrintable

Details

    • MOODLE_29_STABLE, MOODLE_33_STABLE
    • MOODLE_33_STABLE
    • MDL-50538-master
    • 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

    Description

      Retrieve a list of feedbacks from several courses

      Attachments

        Issue Links

          Activity

            People

              jleyva Juan Leyva
              ccito Costantino Cito
              Pau Ferrer Pau Ferrer
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Marina Glancy Marina Glancy
              Amaia Anabitarte, Bas Brands, Carlos Escobedo, Laurent David, Raquel Ortega, Sabina Abellan, Sara Arjona (@sarjona), Juan Leyva, David Woloszyn, Huong Nguyen, Jake Dallimore, Michael Hawkins, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                15/May/17