Live API - Post announcement that does not allow replies

Jump to solution
kathleen1
Community Participant

Hopefully this isn't too basic for this forum - just getting started with Canvas Live API - via the interface at our_school.instructure.com/doc/api/live

I'm posting a course announcement, delayed post, and want to set it to NOT allow users to comment.

The only options for "discussion type" are "threaded" and "side comment", both of which allow users to comment  - and once I run it - that box is checked in the UI. Leaving the "discussion type" field blank defaults to "side comment", so that won't work. I can go into the UI and uncheck the "allow comments" box, but we're posting the announcement in hundreds of courses, so that won't work either.

If I leave "delayed post at" blank, regardless of what discussion type I select, the announcement does not allow replies. But we need to have that field populated.

What am I missing?

Thanks for helping this newbie out 🙂

UPDATE - it looks like if I set it so there are a few seconds between "delayed_post_at" and "lock_at" that would be a work around to only allow replies but still have the announcement visible.... at least I think that's the case. I had thought "lock_at" would be the time when students could no longer see the announcement, but it's when students can no longer reply. Is that correct?? With this new info, I have new questions 😉  is there any way to set an "announcement_ends_at" date/time for a course announcement within the Live API UI? Also, is it possible to pin the announcement using the Live API - I think not, but I figured it's worth asking.

Thanks!

Kathleen Barringer

Excelsior College

Labels (3)
1 Solution
jerry_nguyen
Community Contributor

@kathleen1 

I had thought "lock_at" would be the time when students could no longer see the announcement, but it's when students can no longer reply. Is that correct??

Yes, in case of an announcement. Alternatively, instead of setting lock_at date, you can POST this undocumented parameter "locked" as true. However, this is not available through the live UI so I would suggest using another tool like Postman 

is there any way to set an "announcement_ends_at" date/time for a course announcement within the Live API UI

The announcement ends date is only available for Global Announcements, thus you will have to delete the announcement manually. API is the backend of Canvas UI, thus if an option is not visible through the UI then it's not possible to set it through API 

Also, is it possible to pin the announcement using the Live API

Pinning is only used for discussion. The newer announcement will always display on the top.

 

 

 

 

View solution in original post

0 Likes