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

New Web Service mod_feeback_get_unfinished_responses

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.2.1
    • Fix Version/s: 3.3
    • Component/s: Feedback, Web Services
    • Labels:
    • Testing Instructions:
      Hide
      1. Create or use an existing feedback with at least two pages with questions. It is recommend to use numeric, textfield or textarea questions.
      2. As one student in the course, open the feedback and reply only to the questions in the first page (you have to reply and then click to go to the nextpage).
      3. As admin, enable "Mobile services": Plugins ► Web Services ► Mobile
      4. Create a Token for the student user you used to reply the feedback.
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      5. Give the capability webservice:rest/use to the authenticated users role
        • Click on Site administration ► Users► Permissions ► Define roles
      6. 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=15&wsfunction=mod_feedback_get_unfinished_responses&wstoken=12a2a65aeea2a177055e233f9e303218&moodlewssettingfilter=true' | python -m "json.tool"

      7. Confirm that
        • You receive the list of responses of the questions of the first page. You should check that the field value contains the response you choose (in some cases, like multichoice questions, it will be and id)
      Show
      Create or use an existing feedback with at least two pages with questions. It is recommend to use numeric, textfield or textarea questions. As one student in the course, open the feedback and reply only to the questions in the first page (you have to reply and then click to go to the nextpage). As admin, enable "Mobile services": Plugins ► Web Services ► Mobile Create a Token for the student user you used to reply the feedback. Click on Site administration ► Plugins ► Web services ► Manage tokens Give the capability webservice:rest/use to the authenticated users role Click on Site administration ► Users► Permissions ► Define roles 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=15&wsfunction=mod_feedback_get_unfinished_responses&wstoken=12a2a65aeea2a177055e233f9e303218&moodlewssettingfilter=true' | python -m "json.tool" Confirm that You receive the list of responses of the questions of the first page. You should check that the field value contains the response you choose (in some cases, like multichoice questions, it will be and id)
    • Affected Branches:
      MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_33_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-58229-master

      Description

      Retrieves responses from an unfinished attempt

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jleyva Juan Leyva
                Reporter:
                jleyva Juan Leyva
                Peer reviewer:
                Pau Ferrer
                Integrator:
                Eloy Lafuente (stronk7)
                Tester:
                cameron1729
                Participants:
                Component watchers:
                Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón, Juan Leyva, Jake Dallimore, Jun Pataleta
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  15/May/17