Last activity time

Jump to solution
HaoxinLi
Community Member

Hi all,

The application we are building wants to find out when was the last time a student accessed Canvas via Canvas REST API. Is there a third way to find out user's last activity time of using Canvas, other than:

1. page_view in the User API (unfortunately this is not possible for us as we do not have admin rights)

2. History API (certain clicks on Canvas are not recorded and we don't know which ones)

For example, we can find out the last time a student was active in a course, following the instructions ("Last Activity" of users)

image.png

image.png https://community.canvaslms.com/t5/Instructor-Guide/How-do-I-use-the-People-page-in-a-course-as-an-i...

Does anyone know how to get that information for a user for Canvas entirely (not just for a single course), and via REST API?

Thank you in advance 😀

Labels (2)
0 Likes
1 Solution
James
Community Champion

@HaoxinLi 

The last activity and total activity is available through the Enrollments API. It comes as the last_activity_at (in ISO8601 format) and total_activity_time (in seconds).

They are not reliable measures and do not catch all activity and catch some non-significant activity as well. I download the data daily so I can provide historical tracking, I will see the last activity change, but not the total activity time and that typically happens when someone is using the mobile app or spending less than 2 minutes in the course. That said, the information is still there from the enrollments API and you get it for an entire course or section or for an individual student.

View solution in original post