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

New Web Service mod_feedback_get_responses_analysis

    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 forced to separate groups with at least two questions in one unique page. It is recommend to use numeric, textfield or textarea questions. The feedback should be anonymous.
      2. Add several students to the course in two different groups.
      3. Override the teacher role so they don't have the accessallgroups capability in the course or in the new feedback activity
      4. Complete the feedback with at least 4 students (2 for each group).
      5. As admin, enable "Mobile services": Site administration ► Mobile app ► Mobile settings
      6. Create tokens for two teachers (in a different group each one).
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      7. Next, you can do a CURL REST call simulating a WS client with the first group teacher 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=16&wsfunction=mod_feedback_get_responses_analysis&wstoken=a70d553bbaf6d9b260a9e5c701b3c46e&moodlewssettingfilter=true' | python -m "json.tool"

      8. Confirm that the data returned by the WS match the information in the Show responses tab of the feedback when you are checking it as teacher in Moodle and you only see your student responses. Confirm that in the response you don't see userids (since it is anonymous)
      9. Execute the WS again using the other teacher token, and check that the information match to the one in Moodle.
      10. Repeat the steps above but using a non-anonymous feedback. In the student responeses you should see the user id.
      Show
      Create or use an existing feedback forced to separate groups with at least two questions in one unique page. It is recommend to use numeric, textfield or textarea questions. The feedback should be anonymous. Add several students to the course in two different groups. Override the teacher role so they don't have the accessallgroups capability in the course or in the new feedback activity Complete the feedback with at least 4 students (2 for each group). As admin, enable "Mobile services": Site administration ► Mobile app ► Mobile settings Create tokens for two teachers (in a different group each one). Click on Site administration ► Plugins ► Web services ► Manage tokens Next, you can do a CURL REST call simulating a WS client with the first group teacher 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=16&wsfunction=mod_feedback_get_responses_analysis&wstoken=a70d553bbaf6d9b260a9e5c701b3c46e&moodlewssettingfilter=true' | python -m "json.tool" Confirm that the data returned by the WS match the information in the Show responses tab of the feedback when you are checking it as teacher in Moodle and you only see your student responses. Confirm that in the response you don't see userids (since it is anonymous) Execute the WS again using the other teacher token, and check that the information match to the one in Moodle. Repeat the steps above but using a non-anonymous feedback. In the student responeses you should see the user id.
    • Affected Branches:
      MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_33_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-57821-master

      Description

      Return the feedback user responses

        Attachments

          Issue Links

            Activity

              People

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

                Dates

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