cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jared_flaherty
Community Contributor

Content Migration API Date Issue [remove_dates]

Jump to solution

Heylo Everybody-

I'm having a bit of an issue with Course start/end dates in relationship with the [remove_dates] option.     

Context/Background:    We use course master courses that deploy to all our online and our f2f/blended courses via the Content Migration API.      We setup our modules to be locked until a certain week in the term in our course master courses in order to accomodate our online courses.      Therefore, when we send the Content Migration API for our online courses we use the [shift_dates]  = true.    We don't want any module dates of any kind in our F2F/Blended courses, so in the Content Migration API for them, we say [shift_dates] false, and then we put in:  date_shift_options [remove dates].     This is all working just hunkydory fine.

Problem is that the [remove dates] also removes the Course start/end dates.    I would have never thought it would, but it does (it also does this in the UI when importing content and selecting remove dates).      Well, ok, fine....  let's get these dates back in there, right?     Well, we run our Courses API every night and they don't get stuck back in.       

Why in the heck don't they go back in?      I understand that if we were to make any changes in the UI, that they would stick, but an API is not part of the UI.   

We have tried sending over the Courses API as "sticky" and it didn't work.

I have found that I can do a SIS Import in the UI and checkmark the Override UI Changes and that WILL put the dates back in.

Any advice on how to get these dates back in via an API would be GREATLY APPRECIATED.    

TIA

Jared

1 Solution

Accepted Solutions

HI-

Yes, you are understanding correctly.        We will try the Update a course PUT.         I had missed course[start_at] for Course Update when I was reading about Course Updates.    I figured running the regular Courses API, it would update it.      It does for accounts, short name, long name, etc.    I'll give it a whirl.  Thanks!

Have fun on your trip...     Sounds like a good one.      I have lived in CA before and spent time up and down the West coast, camping in the back of my truck.   I used to live in San Luis Obispo, CA and was a school teacher, so I would cruise around the West coast during summer breaks.

Have fun!!   Thanks for your help!!!

Oh, btw, a few minutes ago I  heard back from Senior Level Canvas admins that a fix was in QA to stop the removal of the course start/end dates in the Content Migration api of [remove_dates].    The course settings shouldn't be affected by this Content Migration API.    They are fixing it, I hope!!!

View solution in original post

9 Replies
kenneth_larsen
Community Champion

 @jared_flaherty ​,

Sounds like fun. I don't think there is a way around the [remove dates] but putting them back in should work. Can you explain a little more of what you mean with your "we run our Courses API every night and they don't get stuck back in" statement? What is it you are running at night?

Hi!

We run a full load "create a new course" Courses API in the middle of the night every night, which has the start/end dates.      I would have bet that the dates would get stuck back in after the content migration api wiped them out.       

It seems like it's treating the content migration api like a UI change.     for example, there are plenty of our instructors that will change their start/end dates manually themselves.... the courses api that we run every night doesn't switch them back to what is in the data in the api, as UI changes trump API data.         but since we used an api to do the content migration, why in the heck can't we stick the dates back in via api?

I have never run into the UI changes trump API data issue. I use the API for a wide variety of tools that create courses, add content and adjust dates and have never had my changes not apply because they came from the API.

Just for clarification, do you run both the create a new course api and the content migration api every night? If that is the case I would think that the create course would be putting the start/end dates in and then the content migration would be removing them right after.

we only run the content migration the first time the course api creates the course.    

I apologize that I am struggling a little to wrap my mind around your process. It is Friday and I am leaving tomorrow for a two week vacation so my mind is not necessarily firing on all cylinders.

So you create a course (at the first of a term?) and use the content migration API to add the content. What is the purpose of creating a new course every night?

the courses api doesn't always create a new course, it just runs and if that SISID is already in use, it doesn't create a new course.,,,   we want this process to stick those dates back in.   

have a great vacation!!     headed anywhere fun?

Aha, I was wondering if that was the case.

Here is what I think might be happening:

  1. Your first run creates the course with start/end dates.
  2. The content migration removes those start end dates.
  3. Your nightly process doesn't stick them back in because it sees that the course already exists and so does nothing with it.

You could add in a check to your nightly process that, if the SISID is already in use, checks the start/end dates and uses the course update API to add the dates back in if they are empty.

For our vacation we are heading to northern California and southern Oregon. We will spend some time camping in the redwoods, a couple of nights camping along the coast in Oregon and then some time visiting some friends that live in Oregon. It should be a lot of fun. It is an area of the US that I have never been to so I am excited.

Hopefully that helps.

HI-

Yes, you are understanding correctly.        We will try the Update a course PUT.         I had missed course[start_at] for Course Update when I was reading about Course Updates.    I figured running the regular Courses API, it would update it.      It does for accounts, short name, long name, etc.    I'll give it a whirl.  Thanks!

Have fun on your trip...     Sounds like a good one.      I have lived in CA before and spent time up and down the West coast, camping in the back of my truck.   I used to live in San Luis Obispo, CA and was a school teacher, so I would cruise around the West coast during summer breaks.

Have fun!!   Thanks for your help!!!

Oh, btw, a few minutes ago I  heard back from Senior Level Canvas admins that a fix was in QA to stop the removal of the course start/end dates in the Content Migration api of [remove_dates].    The course settings shouldn't be affected by this Content Migration API.    They are fixing it, I hope!!!

View solution in original post

That's great to hear that they might be fixing the API. I am glad I could help, I love a good challenge.