cancel
Showing results for 
Search instead for 
Did you mean: 
irishb
Learner II

Any hacks for changing which calendar an event/assignment, etc, is associated with?

We looked for any options API-wise but no luck.

Any suggestions/work-arounds, please?

Thank you for your time and help with this.

10 Replies
chofer
Community Coach
Community Coach

Hi irishb​...

This sounds like a good question to have over in the Canvas Developers Group.  Would you mind if I moved it over there?  You may need to join that group to continue the conversation.

James
Navigator

irishb​,

I'm not sure exactly what you're trying to accomplish.

In the Calendar API, there is an endpoint to Update a calendar event​.

The first item there is calendar_event[context_code], which says it's "Context code of the course/group/user whose calendar this event should be added to." That makes it sound like it's the calendar something should belong to and by setting that value, you could change the calendar an event belongs to.

So, it sounds like if you do a Get a calendar event and do a Put with a different context_code, it should move it.

That's for a calendar event. For an assignment, it seems that it should always be associated with a course, so I'm not sure that it's changeable.

But you wrote that you looked in the API, so that's why I wrote I'm not quite sure what you're asking for. Maybe an example of what you're trying to do would help.

Disclaimer: I've not used the Calendar Events API, I'm just reading the docs, so I may be missing something there where it says one thing and doesn't actually do it.

Beth_Young
Community Member

I don't know of a way to change an event once you have created it. But if adjust your calendar settings before you start creating events, so that only the destination calendar shows, then whatever events you create will default to that calendar.

For example, let's say you're inputting office hours for ABC 123. Go into the calendar and turn off/hide all other courses and your personal calendar. Now, whenever you create an event, it will default to ABC 123.

I know this isn't exactly what you asked for, but maybe it will help someone in the future? 

Oh!  Also you can import the events to a different calendar using the import tool, then delete them from the original calendar.

Stefanie
Community Team
Community Team

irishb, is one of the solutions provided working for you? And/or would you like to take up  @chofer ​ on his offer to share your question with the Canvas Developers​ group?

scottdennis
Community Team
Community Team

In most cases I would just advise that you create a new event in the other calendar and then delete the one in the first calendar.  I've had to do that myself plenty of times.

irishb
Learner II

 @James ​ and  @Beth_Young ​ and  @scottdennis ​

(Meant to post this Aug 24th...)

Thank you so much for your input, I really appreciate it.

One of our faculty created a ton of "events" (for the entire term)

under her own calendar instead of the course calendar

so we were looking for an easier fix than deleting and re-creating.

The faculty has a better understanding of how to work with the Calendar now ; )

and I hope to revisit the Calendar API soon to try out your suggestion, James.

Thank you again,

Bridget

Hi  @chofer ​,

Sure, this can be moved to the Canvas Developers​ group - thank you for asking.

Bridget

Hey irishb​,

If you haven't seen it already, check out the comment by Product Manager  @peytoncraighill ​ on   for more info on where we are headed with respect to batch creating and batch deleting calendar events.