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

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.3.5, 3.4.1, 3.5
    • 3.3.6, 3.4.3
    • Feedback
    • MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE
    • MOODLE_33_STABLE, MOODLE_34_STABLE
    • MDL-61321-master
    • 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

    Description

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

      Attachments

        Activity

          People

            jleyva Juan Leyva
            jleyva Juan Leyva
            Marina Glancy Marina Glancy
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Simey Lameze Simey Lameze
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              17/May/18