How to display TODO items for a current user, just as Canvas does?

DominicDeSantis
Community Member
2
1860

My team is trying to replicate in one of our views how Canvas presents TODOs in its own UI. The TODO items endpoint (https://canvas.instructure.com/doc/api/users.html#method.users.todo_items) appears to be the correct one to use, although it's unclear what parameters Canvas itself may be using to for its presentation. As such, we have some questions about Canvas and the API.

When Canvas presents the TODOs in its own UI, what rules/boundaries determine the list of items that are being presented:
1. Does it present the user's most recent n number of TODOs?
2. Does it present the user's TODOs for the current term?
3. Does it present all of the user's TODOs ever?
4. Something else?

Regarding the TODO items API (https://canvas.instructure.com/doc/api/users.html#method.users.todo_items), we're trying to understand some nuances of the pagination. Specifically, what is the difference between fetching the "current" vs "last" pages?

2 Comments
jerry_nguyen
Community Contributor

@DominicDeSantis 

There is no document on how Canvas Todo displays or behaves. From my understanding, it displays all pending items (Unless a user chooses to 'mute' it by clicking on the cross) from all courses that they're enrolled into.

If you simply need to display a list of all ungraded submissions, you can check out my implementation here: https://community.canvaslms.com/t5/Canvas-Developers-Group/Custom-JS-to-display-full-sortable-To-Do-...

My script uses GraphQL to avoid having to deal with pagniation.

peterdee
Community Novice

My quizzes do not show up in the student CANVAS app under the 'todo' list.  Why is that?  I am the instructor and none of my students can see them in the app.