cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
kenneth_larsen
Community Champion

Anyone figured out how to set a page to do date through the API?

Jump to solution

Last Fall Canvas added the ability to set a date on pages so that they appear in the student to do list:

308027_pastedImage_1.png

308030_pastedImage_5.png

Unfortunately, there is no information about this functionality available in the Pages API.

I can view that date using the List pages or Show page API

308029_pastedImage_3.png

I have tried the typical Update/create page api pattern for updating page information by passing wiki_page[todo_date] but that doesn't appear to do anything.

Anyone worked with this yet, or any of the awesome Canvas Engineers have any information on how to set this date through the API?

Thanks fo any insights!

Labels (1)
1 Solution

Accepted Solutions
James
Community Champion

 @kenneth_larsen 

Try: student_todo_at instead of todo_at

Here's a screenshot of what Canvas sends when it does it (from the network tab on the developer tools)

308036_pastedImage_4.png

Canvas does use the API to update this, with a PUT method.

View solution in original post

6 Replies
James
Community Champion

 @kenneth_larsen 

Try: student_todo_at instead of todo_at

Here's a screenshot of what Canvas sends when it does it (from the network tab on the developer tools)

308036_pastedImage_4.png

Canvas does use the API to update this, with a PUT method.

View solution in original post

kenneth_larsen
Community Champion

As always  @James ‌, you are a genius! Thank you immensely for your help.

Looking at the network tab of the browser's developer tools has helped me a lot. Since I'm not a Ruby programmer, it's easier for me to make sense out of what Canvas is sending than trying to find the place in the source code that explains it and try to understand it. I have found that with most create or update operations, you have to turn on the option to persist the logs because the PUT is the first thing it does when you click update, but then it reloads the page and wipes the log so you can't see what it did.

Thanks for that tip. I didn't know there was a way to persist the logs, I was trying to see if I could identify what they were sending but the reload was preventing that. I will have to find the persist option.

There's a checkbox near the top of the Network tab. In Firefox, it's called Persist Logs. In Chrome it's called Preserve log. I'm not sure where it's at in Safari.

Chrome:

308038_pastedImage_1.png

Firefox:

308054_pastedImage_2.png

straussi
Community Champion

Excellent info. We just had this come up with our Worldwide courses, and I'll pass this to our development folks.