The Instructure Community will enter a read-only state on November 22, 2025 as we prepare to migrate to our new Community platform in early December. Read our blog post for more info about this change.
Hello! I'm currently working on a project that would need some data on the students' activities on the Canvas course website. We've looked through the Canvas Guides but there are still some materials we are looking for that are not discussed in it. To be more specific, I have the following questions:
1) Would it be possible for us to have access to how long the students stay in the course website on Canvas?
2) In addition to dates, could we have the students' activities such as views and participation recorded by exact time in a day?
3) Could we also check students' every logon time in Canvas?
Are there any functions in Canvas that could solve my problems? Thanks!
Solved! Go to Solution.
Would it be possible for us to have access to how long the students stay in the course website on Canvas?
Another short answer is...
it's available in the API but not in Canvas Data.
How to calculate students “Total Activity” time spent in a course with Canvas Data?
Some thoughts, concepts, resources, queries... The Problem with the Requests Table
Seems like a short response, but come back and ask any questions you have. :smileygrin:
Would it be possible for us to have access to how long the students stay in the course website on Canvas?
Another short answer is...
it's available in the API but not in Canvas Data.
How to calculate students “Total Activity” time spent in a course with Canvas Data?
To add to @millerjm 's comment -- there are some things available in just the API, some things only available through Canvas Data, some available in both, and some that isn't available in either. There is a third option - Canvas Live Events. I know carroll-ccsd has been working with those -- I think even with Joni -- but I don't know how that contributes to the story as far as duplicity and exclusivity of information. I also don't know about graphQL to know if it exposes anything not previously exposed.
I just spent a month writing code that would download current information from Canvas and import it into an early alert system. Using 3+ day old data (by the time it got into the other system) from Canvas Data wasn't a viable solution. As part of that, I downloaded the information for each active enrollment that has the last date of activity and total time spent in course. We're much smaller, but I managed to get the download of active courses, current enrollments, incremental submissions, and analytics down to 3 minutes each day. A full download of the submissions took me about 14 minutes. Again, we're really small and I'm making 70 concurrent API calls in some places to acheive that.
@James makes a good point, the various endpoints for these type of questions exists in multiple places, sometimes it's a matter of what you can gain access to or consume based on your experience and tools at hand. Reading @millerjm 's response I was thinking we need a feature matrix, limited in x, possible in y, complicated in z.
As James states, depending on the size of your school it can often make sense to combine these things and compile a solution that fills in the gaps. I really want to start collecting these solutions in some open source community reference.
Live Events is a stream of transactions that make up several parts of what is Canvas Data or API end points.
With the API we have to request that information on a per record basis (or just about), with Canvas Data we have to get the files and expect it's missing some of the data we want now, until we can get an update later. Rinse Repeat...
However, Live Events doesn't create or send total_time information, it would send most 'clicks' or action taken by the user. Asset Accessed (a resource within a course), Submission, Discussion Entry, File Uploaded. You can parse this information and produce something like total_time, which would be very similar to how I do so with the requests table, but there would be less noise, because there is no LTI traffic... what is job based can be separated from user actions. On the subject, for me, Live Events fills the gap between using the API for 'last activity', and the enrollment_dim.last_activity_at. Where that is static from the last date of download, Live Events can be appended to CD and I can query for the last asset_accessed, submission, discussion_entry etc, for that student and that course, and show the Instructor, the student was active this morning, even though CD was downloaded and installed last night.
I also plan to use Live Events to truncate heaps of rows from the Requests Table in order to have 'clicks' not logs.
I haven't gone very far with GraphQL yet, I'm excited about it, but I'm focused on releasing this Live Events consumer for the community so we can all have the same toys. @phanley , posted the most impressive GraphQL example I've seen in Canvas context here, which provides a very nice query with joined API endpoints and produces a result with course name, users/enrollments, last_activity, section, and grades. GraphQL is used within Canvas in a few places, the Course Context Card is one. For GraphQL, just hit /graphiql to your Canvas URL, start with beta/test. :smileygrin:
Here is the feature idea that I made for this activity which is missing from Canvas Data.
Community helpTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign inTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign in
This discussion post is outdated and has been archived. Please use the Community question forums and official documentation for the most current and accurate information.