To Our Amazing Educators Everywhere,
Happy Teacher Appreciation Week!
Found this content helpful? Log in or sign up to leave a like!
I am trying to write a program for my team to update course start and end times through the API using Python. The end_at time isn't updating. What am I doing wrong? I've code below for obvious reasons.
Solved! Go to Solution.
Hi @bertscjn1,
A couple things jump out at me right away...
First, you're doing a post call, when to modify an existing course you want to use a put call.
Second, I'm confused by your print statements at the end. You're not changing the start time, so that doesn't matter too much. But when printing the end time, you're printing from i, which is going to have the original end time of the course, not your updated one. Unsure if that's intentional or not.
Adjusting those may help!
-Chris
Hi @bertscjn1,
A couple things jump out at me right away...
First, you're doing a post call, when to modify an existing course you want to use a put call.
Second, I'm confused by your print statements at the end. You're not changing the start time, so that doesn't matter too much. But when printing the end time, you're printing from i, which is going to have the original end time of the course, not your updated one. Unsure if that's intentional or not.
Adjusting those may help!
-Chris
I feel so stupid. Thanks!
I have the print statements at the end just to check that the system is actually updated with that I told it. Adjusting your solutions, I have it working now.
To participate in the Instructure Community, you need to sign up or log in:
Sign In