cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
akshya
Community Participant

Suppress emails sent from Assignments using REST API

Hi There, I recently had asked a question on here regarding the Assignments API and I've hit a new snag. Just to reiterate, the tool that I'm developing has the following workflow:

- Attendance is marked in a course for a session

- Students' Attendance Grades are calculated

- These grades are pushed to a custom Assignment made through the Assignments API

- This Assignment allows Canvas Gradebook to use our posted attendance points for the overall grade

As you can see, the tool would be posting new grades to the Assignment quite often. The problem I am facing is that each time I'm updating a user's score, they are receiving an email from Canvas.

I tried adding the parameter 'assignment[notify_of_update]=false' when I POST an Assignment, but this doesn't seem to be doing the trick. I also don't see any way of marking single submissions to not trigger emails, or anything along those lines. I tried to manually find the actual settings that might control assignment emails on Canvas, but I wasn't able to find anything.

Is there something I am missing, or is this something I wouldn't be able to suppress? Any help is appreciated, thank you.

Labels (2)
2 Replies
pklove
Community Champion

I don't think you are missing anything.   The assignment[notify_of_update] is for content updates (not grades) so that won't do what you want.  And there doesn't seem to be anything in the docs on the submission endpoint to suppress sending the email.

I think the only way you could do it would be to read a user's notification preferences, change as needed, update the grade, then set the user's preference back to what they were.  Which probably is not a good idea.

akshya
Community Participant

Thanks for providing some context over the 'assignment[notify_of_update] ' field, Peter.

I agree that modifying individual user notification preferences is a bad idea, we will probably look into alerting users' through our tool that certain settings will cause Canvas to trigger emails.