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

mod_feedback_get_responses_analysis is returning just the first 10 item responses of a feedback

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.3.5, 3.4.1, 3.5
    • Fix Version/s: 3.3.6, 3.4.3
    • Component/s: Feedback
    • Labels:
    • Testing Instructions:
      Hide
      1. As admin create a new feedback activity in a course setting the " Record user names " field to "Anonymous"
      2. Once created, access the activity and via the "Edit questions tab", add new questions (at least 11 questions). They can all be the same type (for example, short text answer)
      3. As admin, enrol one user as student in the course
      4. As admin, enrol another user as teacher in the course
      5. Loggin on the site as the student and complete the feedback (answering something different for each question, for example, response1, response2, etc..)
      6. As admin, enable "Mobile services": Site administration ► Mobile app ► Mobile settings
      7. Create token for the teacher
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      8. Next, you can do a CURL REST call simulating a WS client using the teacher token..
        • You need to replace the wstoken, feedbackid (the feedback instance value, id field from feedback table) 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"

      9. Confirm that in the data structure returned, you see the 11 responses the student filled in the anonattempts->responses field
      Show
      As admin create a new feedback activity in a course setting the " Record user names " field to "Anonymous" Once created, access the activity and via the "Edit questions tab", add new questions (at least 11 questions). They can all be the same type (for example, short text answer) As admin, enrol one user as student in the course As admin, enrol another user as teacher in the course Loggin on the site as the student and complete the feedback (answering something different for each question, for example, response1, response2, etc..) As admin, enable "Mobile services": Site administration ► Mobile app ► Mobile settings Create token for the teacher Click on Site administration ► Plugins ► Web services ► Manage tokens Next, you can do a CURL REST call simulating a WS client using the teacher token.. You need to replace the wstoken, feedbackid (the feedback instance value, id field from feedback table) 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 in the data structure returned, you see the 11 responses the student filled in the anonattempts->responses field
    • Affected Branches:
      MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE
    • Fixed Branches:
      MOODLE_33_STABLE, MOODLE_34_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-61321-master

      Description

      There is a bug in this WS that prevents return more than 10 items responses

        Attachments

          Activity

            People

            • Assignee:
              jleyva Juan Leyva
              Reporter:
              jleyva Juan Leyva
              Peer reviewer:
              Marina Glancy
              Integrator:
              Eloy Lafuente (stronk7)
              Tester:
              Simey Lameze
              Participants:
              Component watchers:
              Amaia Anabitarte, Bas Brands, Carlos Escobedo, 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:
                17/May/18