cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Surveyor II

Messaging Observers of Students in Canvas

Hi All,

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:

demo.gif

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

---------------

Changelog:

Version 0.07 on 17/04/20

  • Fixed issue where conversations (Inbox) recipients would become invalid after a recipient was removed.

Version 0.06 on 11/10/17

  • Added support for courses with more than one hundred enrolments.

Version 0.05 on 07/07/17

  • Added auto tick "Send an individual message to each recipient" function. This behaviour is active by default, but can be disabled in the msgobs options.

Version 0.04 on 06/07/17

  • Fixed issue where multiple course enrolment lookups were made for the same course in account admin mode.

Version 0.03 on 03/07/17

  • Added support for any kind of group in the recipient list.

Version 0.02 on 15/03/17

  • Fixed issue with unescaped message content.
  • Prevented clicking Remove Students while Include observers function is running.
  • Added dialog to preserve message content if sending fails in Gradebook function.

Version 0.01 on 20/09/16

  • Initial Release
28 Replies
Highlighted
Community Member

Not sure if this is still in development and I realize that this isn't a support thread, but I'm running into an issue trying to add this to my account theme.

I'm getting this error. Not sure if anyone can help point me in the right direction about what I'm missing.

314238_Screen Shot 2019-05-29 at 1.43.44 PM.png

Highlighted

Hi Matt,

Do you have existing JavaScript customisations you were combining this with?

Perhaps in your test instance (school.test.instructure.com), try adding only the msgobs.user.js file to your your JavaScript Customisations in your theme (from Admin > Themes > Current Theme Theme Editor > Upload, set Javascript File field to the msgobs.user.js file downloaded from the links above > Save theme > Apply). If that's successful, it might indicate an issue when combining with other scripts.

Highlighted

Figure it out. It was an issue with the server. Everything is working now.

Highlighted
Surveyor II

New version 0.07 available here: https://github.com/sdjrice/msgobs

- Fixed issue where conversations (Inbox) recipients would become invalid after a recipient was removed.

Highlighted

Thanks for pointing that out Audra. I've included your suggested endpoint change in the most recent update. Only a two year turnaround!

Highlighted

Hi @Steve_25,

This had been working great until this week or so and we are now getting errors relating to the AutoCompleteView,js when we try to run it for a student. Below is the callstack.

MessageFormDialog.js:436 Uncaught TypeError: e.id.match is not a function
at ft.canAddNotesFor (MessageFormDialog.js:436)
at MessageFormDialog.js:410
at Function.lt (lodash.underscore.js:2481)
at ft.recipientIdsChanged (MessageFormDialog.js:409)
at c (backbone.js:208)
at Ue.trigger (backbone.js:149)
at Ue._addToken (AutocompleteView.js:719)
at AutocompleteView.js:829
at Function.rt (lodash.underscore.js:2273)
at Ue.setTokens (AutocompleteView.js:827)

I am running the code as part of the theme and have no other external JS than yours running.
Is this something you have seen before? It seems to load one parent but doesn't colour code them like it used to and dies trying to load a subsequent parent.

Kind Regards,
Courtney O'Sullivan

Highlighted
Surveyor II

New version 0.08 available here: https://github.com/sdjrice/msgobs

- Fixed a conversations (Inbox) issue for instances with the faculty journal enabled.

@courtney_osulliApologies I missed your earlier post, I think I was unsubscribed from this thread after the community platform change. This version should fix the problem you reported. 

Highlighted
Surveyor II

Steve, I'm new to adding JavaScript to our Canvas installation. I have downloaded TamperMonkey and updated our information in the script. I'm a bit confused, though, by the Theme side of things and getting it uploaded into Canvas -- working with our test installation. Are you open to questions?

Highlighted

Hi @paula_setserkis, I'm certainly open to questions!

Regarding the installation of the script, if you do not have administrative access to Canvas for your institution, then the Tampermonkey method is for you, but if you are an administrator wanting to deploy the script for every teacher in your institution then the theme modification is where you should install the script. Only one of the two methods is required.