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

New Web Service mod_feedback_get_items

XMLWordPrintable

    • MOODLE_32_STABLE
    • MOODLE_33_STABLE
    • MDL-57815-master
    • Hide
      1. Create a mod_feedback activity with at least 4 different question types in two separate pages.
      2. As admin, enable "Mobile services": Site administration ► Mobile app ► Mobile settings
      3. Create a Token for one student user in the course where the feedback is
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      4. Next, you can do a CURL REST call simulating a WS client with the student user .
        • You  need to replace the wstoken, feedbackid (the feedback instance value) and the URL of your moodle instance

          curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json'  --data 'feedbackid=14&wsfunction=mod_feedback_get_items&wstoken=12a2a65aeea2a177055e233f9e303218&moodlewssettingfilter=true' | python -m "json.tool"

      5. Confirm that
        • You receive a list with all the questions that you have created in the feedback, including the pagebreak.
        • The question name/label/presentation match correctly with what is displayed in the web interface. Please note that some questions like multichoice have serialized information in the presentaiton field. And other like textarea or textfield use this field for storing settings.
      Show
      Create a mod_feedback activity with at least 4 different question types in two separate pages. As admin, enable "Mobile services": Site administration ► Mobile app ► Mobile settings Create a Token for one student user in the course where the feedback is 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, feedbackid (the feedback instance value) and the URL of your moodle instance curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json'  --data 'feedbackid=14&wsfunction=mod_feedback_get_items&wstoken=12a2a65aeea2a177055e233f9e303218&moodlewssettingfilter=true' | python -m "json.tool" Confirm that You receive a list with all the questions that you have created in the feedback, including the pagebreak. The question name/label/presentation match correctly with what is displayed in the web interface. Please note that some questions like multichoice have serialized information in the presentaiton field. And other like textarea or textfield use this field for storing settings.

      Return a complete list of the questions in a feedback so external clients (like the mobile app) can calculate the amount of information to download.

            jleyva Juan Leyva
            jleyva Juan Leyva
            Pau Ferrer Pau Ferrer
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Marina Glancy Marina Glancy
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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