Modification of submission feedback comment through WS API

Modification of submission feedback comment through WS API

by Peter Tröger -
Number of replies: 0

Dear all,

I want to update the feedback comment for a particular submission with a web service call, but without touching the current grade or grading status. The grader UI supports this, so I expected it to be possible with an API call.

GIven the fact that the grader UI is relying on mod_assign_submit_grading_form calls through Ajax, I first tried to use the same function in a web service call. The problem here is that any variation of jsonformdata (in combination with correct wstoken, wsfunction, assignmentid and userid parameters) gives me a HTTP 200, but nothing happens. I wasn't able to find the particular function in the Moodle sources where this parameter is parsed, which may help to understand the expected way of formulating it correctly.

The second option was to use the normal mod_assign_save_grade WS funtion. The grade parameter is mandatory here, so after some playing around, I was only able to achieve my goal by submitting an invalid grade value. This leaves the grading status intact, but updates the feedback comment as expected.

Question: Is this the only way, or do I miss something?

Average of ratings: -