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

Bulk Change Observer Notification Preferences

Jump to solution

Our SIS dumped in parents as observers in all of our courses. This is fine, but it automatically makes the notification frequency set to "Notify me right away" upon grade changes. We would prefer the parents have the opportunity to opt-in to receiving notifications if they choose.

Is there a way to mass change all observers' notification settings to "Never"?

I should note that I've tried to accomplish this with a few tools already to no avail. I'm relatively new to Postman, but I don't see an obvious and easy way to pull in all our current course's observers and change their notification preferences at once. This feature is not already built into this Python Canvas API wrapper (which I love by the way), and I'd prefer to know if a relatively simple way to do this has already been discovered before I embark on tinkering with it.

1 Solution

Accepted Solutions
mwatson2
Community Participant

I think I've written a solution for this in Python. Given a set of term_ids, it pulls all courses, gathers all observers, and changes every notification preference to "never."

I would appreciate any help improving this if anyone cares to sift through it. Here it is on Github.

* Edit: It was dumb of me to post the code before, as I have already changed it. My most recent edit is to remove the code and link to it on Github.

View solution in original post

5 Replies
Stefanie
Community Team
Community Team

 @mwatson2 ‌, I've shared your question with the Canvas Admins‌ and Canvas Developers‌ groups to increase its visibility with those who are most likely to have had experience with this.

mwatson2
Community Participant

I think I've written a solution for this in Python. Given a set of term_ids, it pulls all courses, gathers all observers, and changes every notification preference to "never."

I would appreciate any help improving this if anyone cares to sift through it. Here it is on Github.

* Edit: It was dumb of me to post the code before, as I have already changed it. My most recent edit is to remove the code and link to it on Github.

View solution in original post

matthew_emond
Community Participant

Hey  @mwatson2 ,

I just stumbled across your post and was pleased to see that you're using our CanvasAPI library. Thanks for the shout out! I hope you find it useful.

It looks like you've already resolved your issue, but I wanted to ask which endpoint you needed but that was not covered by CanvasAPI. Was it the Update Notification Preference endpoint? I did a quick look, and at the moment we don't cover that particular endpoint, but I'd be happy to put it on the to-do list.

If you run into any issues with the library, or have any suggestions, please let me know. I'll be happy to assist you any way I can.

Happy coding!
- Matt

mwatson2
Community Participant

 @matthew_emond ,

Thanks for getting in touch. I saw your presentation at InstructureCon this past summer, and I began using your Wrapper immediately. You are correct--I am hitting the Update notification Preference endpoint that you've guessed.

I would bet others would be interested in updating notification preferences, so that may be one to tack onto the todo list. I haven't run into any issues with the wrapper yet, so keep up the great work! I'd love to help out and contribute, but I just haven't found the time yet. 

If you're interested, I had an earlier version of this in which I was hitting the Update Preferences by Category endpoint. However, that was missing some preferences when I would send the request, so I brute-forced it and hit them all individually.

Thanks for all your hard work on this--it makes things much simpler!

Matt

twinner
Community Member

I want to love this script. Like you, I need a way to turn off notifications for all of the parents that got pulled in from my SIS. I've got the script running, but when it hits line 44, it tells me that the USER object has no attribute called "list_communication_channels"

I am not a programmer, so troubleshooting beyond this is tough. If you're still out there, I'd love a little guidance.

Thanks in advance.