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.
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.
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.
Return the feedback user responses
blocks
MDL-57813New Web Service mod_feedback_get_last_completed
Closed
is blocked by
MDL-58227New feedback attempts create new entries in feedback_completed (instead resetting the last attempt)
Closed
MDL-57822New Web Service mod_feedback_get_non_respondents