We've put together a script here at Strath to allow us to send messages to the observers of students from the Canvas Inbox (Conversations) and Marksbook ('Message Students Who...') pages. We're a K-12 institution, so while the ability to send messages to students who have not submitted their assignments is awesome, sometimes we need to let their parents know too! It looks a little something like this:
It's pretty simple. The script inserts some buttons on the 'Message Students Who...' and Inbox 'Send Message' buttons for inserting observers and removing students. Once clicked, the script does a few API calls in the background to determine who the observers of the students are and pops them in the recipient list.
Our CSM mentioned this might be something that other institutions might be interested in, so I've made the script and some instructions available here: https://github.com/sdjrice/msgobs.
If you decide to give it a crack, I'd be interested to hear how it goes! I've tested this with a demo Canvas instance and it's worked ok, but that's the extent of my testing.
All the best!
Download v0.07 Here: https://github.com/sdjrice/msgobs
Version 0.07 on 17/04/20
Version 0.06 on 11/10/17
Version 0.05 on 07/07/17
Version 0.04 on 06/07/17
Version 0.03 on 03/07/17
Version 0.02 on 15/03/17
Version 0.01 on 20/09/16
Correct, this script does apply to the Inbox as well, and adds a little 'include observers' button there too!
I'm excited to try this out. I saw the inherent problem with this in that you could easily hang the system if you are trying to look up too many Observers. Are there any limitations or quirks to this we should be aware of?
It shouldn't totally hang hopefully, I think instead it's just going to take a little while haha! I'm assuming this is happening when, as an account admin, you add a group of students without selecting a course from the course dropdown. When operating in this way the script performs the following:
That 160 lookups is a bit time consuming, especially as it hits the API rate limit API Rate Limiting (the requests are made concurrently). If you select a course first, then it would only look up students within that course (20x1), so that would be a lot quicker.
Why not limit the recipient lookups to the course they were specified from, even when the user doesn't select it? Well, some groups that you add have no course information attached (e.g sections and groups) so they require extra lookups to see what that course belonged to etc. In our institution, no teachers actually have the role where they can add users without first selecting a course, so I just left it with this slow method. That said, If this usage scenario that I've described above applies to you, I could possibly have a look at limiting those admin role lookups to apply only to the courses to which the group belongs How many students are you wanting to look up at a time (ideally) Joe?
I've also just realised I've forgotten to cull duplicate course lookups (occurring when students are enrolled in the same course), so that's a bit dumb. Might go fix that. That may actually speed it up substantially, and might not hit the API limit so hard.
Ok, I have new version for you, 0.04 uploaded to github https://github.com/sdjrice/msgobswhich won't look up the same course twice anymore. That cuts down the number of API calls dramatically because we're not hitting the server for things we already know, which was especially a problem when using whole groups of students. Whoops.
Still a bit slow without a course selected, but much better . Takes around 30 seconds for 73 students here, quicker if there's more crossover in their course enrolments.
Awesome stuff Stephen. I can't tell you how much this new communication capability will help our teachers. Previously they had to use the SIS to easily communicate with students AND parents. Often parents will have a last name, so there is no way to tell who belongs to who. This functionality you built solves all of that and now our teachers will be able to stay in one system.
So, I have one final request... Is it possible to make the "Send an individual message to each recipient" option be checked by default? There is zero reason why messages shouldn't be individual. If they aren't you run into the 'reply all' issue and sometimes even privacy issues. Thanks for all you do.