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

Improve mod_feedback_get_non_respondents to return required data

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.3
    • 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 questions in two pages. It is recommend to use numeric, textfield or textarea questions.
      2. The feedback must not be anonymous.
      3. Add several students to the course.
      4. As one of the students in the course, complete the feedback.
      5. As other student, start the feedback but only answering the question in the first page.
      6. As admin, enable "Mobile services": Site administration ► Mobile app ► Mobile settings
      7. Create a Token for one user with the teacher role in the course.
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      8. 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=16&wsfunction=mod_feedback_get_non_respondents&wstoken=a70d553bbaf6d9b260a9e5c701b3c46e&moodlewssettingfilter=true' | python -m "json.tool"

      9. Confirm that
        • You receive a list containing the ids of the users who didn't complete the feedback.
        • The user who started but not completed the feedback has the started field set to true, the rest of the users to false.
      10. Now, as teacher go to the Moodle web interface. Access to the feedback -> Show non-respondents tab and check that you correctly see the list of users who didn't respond the feedback. You should see the name of the user, profile image and also if he already started or not the feedback (and didn't finished it)
      11. Create an anonymous feedback, and execute the curl request again using the new feedback instance id.
      12. Check that you receive an exception "Anonymous", because the user is anonymous.
      Show
      Create or use an existing feedback with at least two questions in two pages. It is recommend to use numeric, textfield or textarea questions. The feedback must not be anonymous. Add several students to the course. As one of the students in the course, complete the feedback. As other student, start the feedback but only answering the question in the first page. As admin, enable "Mobile services": Site administration ► Mobile app ► Mobile settings Create a Token for one user with the teacher role in the course. 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=16&wsfunction=mod_feedback_get_non_respondents&wstoken=a70d553bbaf6d9b260a9e5c701b3c46e&moodlewssettingfilter=true' | python -m "json.tool" Confirm that You receive a list containing the ids of the users who didn't complete the feedback. The user who started but not completed the feedback has the started field set to true, the rest of the users to false. Now, as teacher go to the Moodle web interface. Access to the feedback -> Show non-respondents tab and check that you correctly see the list of users who didn't respond the feedback. You should see the name of the user, profile image and also if he already started or not the feedback (and didn't finished it) Create an anonymous feedback, and execute the curl request again using the new feedback instance id. Check that you receive an exception "Anonymous", because the user is anonymous.
    • Affected Branches:
      MOODLE_33_STABLE
    • Fixed Branches:
      MOODLE_33_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-58453-master

      Description

      The current implementation does not return all the required data to render properly the information.

        Attachments

          Activity

            People

            Assignee:
            jleyva Juan Leyva
            Reporter:
            jleyva Juan Leyva
            Peer reviewer:
            Pau Ferrer
            Integrator:
            Andrew Nicols
            Tester:
            Mark Nelson
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Juan Leyva, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

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