Obtaining and using Access Report data for an entire course

James
Community Champion
203
144566

May 27, 2020, update (version 15):

Another week, another update. This time I installed a new linter to check for crud and subtle issues with the code. It turned up a lot of little things and at least one place where I was using an array when I thought I was using an object. Here are some of the changes for version 15

  • The file is now sorted by the sortable name, when present. Version 14 sorted it by the Canvas User ID.
  • Promises now work in the code. Version 14 relied on Bottleneck's idle function to kick in, but it might have triggered before all of the fetches were done.
  • The script can now handle students enrolled in multiple sections of the course. You can generate a delimited list of sections, duplicate the information for each section, or just return the first section found.
  • The script now only tries to fetch usage information when there is a last_activity_at date. That is no guarantee that there is an access report, but I never found an access report without having a last activity date.
  • The script can now hide empty columns with no data. Previously, this was only for SIS data unless you edited the code.
  • The script can be run correctly without reloading the page. Previously it appended the data, so if you ran it twice without refreshing the page, the data would be there twice.

May 19, 2020, update (version 14):

I've done a major rewrite of the script.

  • It now uses a throttling library to play nicer with Canvas. Large courses were getting inconsistent results because the requests were failing. Requests shouldn't fail, but if they do, I throttle it even more and then try to repeat the failed requests.
  • I added the Last Activity and Total Activity Time from the People page to the report.
  • I added the current course score and current course grade to the report (the grade is only available if you're using a grading scheme).
  • I modified the quiz views to match what Canvas gives. In the data supplied, they count taking a quiz as a view, but they subtract that off in the online access report. My data now matches theirs.
  • I check the permissions of the user to make sure they can generate a report and don't add the button if they cannot. Previously, students could add the access report, it just didn't give them any information. Now it doesn't even show the button.

This is a major rewrite and updating will show a lot of changes. There is a good chance that any local customization you have done to the script will be lost. Those using a non-instructure.com domain for Canvas may need to reset their // @include line on line 5 (see the custom URL section below).

Synopsis

Canvas provides an Access Report for each student, but you have to click on each student's name from the People page to get it. This document will show you how to install a button on the People page that will create a .CSV file of the Access Report data for all students enrolled in the course. It will then show some ways you can obtain useful information from that data using Microsoft Excel. Although much of this data could be obtained through Canvas Data, this script makes it available to the instructor in real-time.

Quick Install

For those power users who are impatient, here are the quick install steps.

  1. Install a browser userscript manager Tampermonkey for Chrome/Firefox/Safari
  2. Install the Access Report Data user script.
  3. Navigate to the People page and click on the "Access Report Data" button

If you run into problems, be sure to go back and read the instructions.

Note that the Tampermonkey extension for Safari requires payment. This is for the author of the extension that allows the script to run. I am not asking anything for the script itself.

Introduction

Canvas will give you an Access Report for each student that tells you how many times a student has viewed or participated in a particular content item. To obtain the list, you go to the Course Roster by clicking the People navigation link, then click on a student's name. Once you do that, you will get an item on the right-side navigation bar that says "Access Report for student's name". When you click on that, you get something like this:

Student Access Report

It gives you the type of content (as an icon), the name of the content, the number of times a student viewed the content, the number of times a student participated in the content, and the last time the student viewed (or participated) in the content. It is sorted by the time the content was last accessed so you can see what they have been working on most recently.

Unfortunately, this information is available for just one student at a time, so answering questions like "Who viewed the PowerPoint presentation I told them to read?" becomes difficult -- you need to go into each student individually to see that information.

I've written a User Script that solves that problem. It fetches a list of all of the students in the class and then obtains the Access Report for each one, compiling all of that data into a single Comma Separated Values (.CSV) file that can be opened with a spreadsheet like Microsoft Excel.

This document shows you how to install that script and then analyze the data that you get from it.

Installing the User Script

A user script is a JavaScript that is ran by the browser on the user's machine. Rather than a Canvas-supplied script, it's one that the user installs and runs on their own. The installation is per user and per machine, so you will need to install it on each machine that you want to use the script with.

Custom URLs

The script automatically runs on any page that matches https://*.instructure.com/courses/*/users. This is the main People page if your site is hosted by Instructure without a custom instance. If you have a custom URL, like canvas.university.edu, then you will need to modify the script to get it to work.

The specific steps to do this vary depending on your browser add-on. In Greasemonkey, click on the Greasemonkey pull-down, choose Manage User Scripts, find the Access Report Data, right click and choose Edit. In Tampermonkey, click on the Tampermonkey Icon, choose Dashboard, and then click on Access Report Data.

In either case, you need to change // @include statement on line 5 to match your instance. In the case of canvas.university.edu, you should change it to https://canvas.university.edu/courses/*/users. The * is a wildcard that will match any course.

Customization

There are two configuration variables that can be set within the source code to alter the functionality of the script.

  • showViewStudent will include the participations where a student clicked on a student's name from the People (roster) page and viewed their profile when it is set to true. The default is false, which will remove this information from report before the CSV file is downloaded. This information was included prior to February 3, 2017, but faculty were getting confused when they did a pivot table and the names of their students showed up as titles along with assignments and content pages. Now users will have to explicitly set it to true to get that information.
  • quizParticipation is a flag to make the data in this report match the data displayed in the Canvas Access Report. Canvas counts quiz participations as views, but then subtracts them off when displayed. When this is true, it makes this report match Canvas. If false, then it displays what was in the JSON data, which was the previous behavior.
  • enrollmentStates is an array that says what kind of enrollments should be included. The default is 'active' and 'completed', but you may also use 'invited', 'rejected', and 'inactive' (inactive probably won't help much). See the List users in a course endpoint for additional information.
  • analytics is an array that provides an easy way to include the student analytics (last activity and total activity) or grade (current grade and current score).
  • disableMissing is a Boolean value that will remove empty columns from the output when true.
  • headingSpaces will allow you to remove the space in the headings and replace it with something else (empty string or underscore are common). This can cause "User ID" to become "UserID" or "User_ID". Some users reported problems with programs, like R, when there were spaces in the variable names (headings). The default is ' ' (a space), which is to leave the spaces.
  • multipleSections determines how students enrolled in multiple sections are handled. Setting the value to 1 will duplicate the information for each section, so a student enrolled in three sections will have three times the data. This is important if you are using the section in your pivot table, but will throw off the counts if you are not. Setting the values to 2 will take the first section that it finds and use it and ignore all of the other sections so that each item is included only once with no duplication. Setting it to a non-numeric string will use that string as a delimiter but not duplicate any items. The default is ', ' (comma followed by space) so that multiple sections will show up as a comma delimited list.
  • maxConcurrent is the maximum number of concurrent calls to make to Canvas. This is part of the throttling system. The higher this is, the faster the calls can be made, but the more likely you will abuse Canvas in a way that causes them to block your requests.
  • minTime is a delay in milliseconds injected between each call. If you make a lot of calls that the same time, Canvas imposes a penalty that can quickly exhaust the available limit before the maxConcurrent is reached. It is likely that this value will have more impact that maxConcurrent will.
  • debug is a Boolean flag to output debugging information. Included in the debugging output is the minimum x-rate-limit-remaining value and the maximum x-request-cost value. Those can be used to help tweak the maxConcurrent and minTime settings.
  • csvFields contains the headings, source field, any special formatting required, and allows you to disable columns that you do not want. The three sources are u (user data), s (section data), and a (access report data). This is under the advanced configuration section, which typically means don't mess with it if you don't know what you're doing, but any user should be able to change the name property.

Export the Data

In the June 4, 2016, production release, Canvas consolidated the buttons that previously appeared on the People page under the administrative cog.

The script was updated on June 6, 2016, to reflect that change and move the Access Report Data into that same cog. Note that the demonstration videos have not been updated to reflect the change.

Open Settings

When you expand the menu by clicking on the cog, then you can choose the Access Report Data item.

Click Access Report Data

Click on this and wait.

There is now a progress bar that appears once the list of students has been downloaded and it is fetching the access reports.

It has to make an API call for the list of students and then generate the Access Report for each student in the course. This only took 8 seconds for my class with 46 students and up to 112 content items, but we're only one month into the semester and it will probably slow down later. It took 12 seconds on a course with 81 active students and 126 content items. It took 15 seconds for a class with 35 students but 470 content items.

Limitations

Early on, really large classes were having timeout issues in Chrome. Switching to Firefox helped. Now I wonder if the problems were related to the requests failing and so I hope the changes I made with version 14 have improved this so that it is no longer an issue. I've made some improvements to the code with version 14 and let Chrome run for 4.5 minutes in a class with 29,615 items without issues

If you have a really large class, you may need to tweak the settings. The call to get the enrollments is relatively expensive compared to the call to get the usage (access report data). In a class of 300 students, it was fine, but in a class of over 10,000 students, it was timing out. It is supposed to retry failed attempts, but there was some data loss that I haven't tracked down yet. It's best to avoid exhausting the x-rate-limit-remaining header. Increase the minTime or decrease the maxConcurrent values. Normally, the minTime is the more important one, but if your requests are taking a long time to process (like the enrollments were), then you may decrease the number of concurrent requests. Reducing maxConcurrent from 40 to 20 avoided the lost data issue in the 10k+ course and only added 4 seconds to the download time for the class with 300 students.

The course with 81 students actually had 233 students in it, but it was a resource course for faculty and only 81 had bothered to go into the course to do anything. That brings up an important note about the Access Report.

The Access Report only provides information on students who are doing something in the course.

Access Report data does not return information about who has not done something, but Excel has an option that will allow you to see this.

Another thing to note is that additional information is available through the Page View data, like the exact times when students did something and which browser they were using at the time. However, faculty don't generally have access to this information and you have to load the information for each student and sift through it to see which applies to the particular course. This takes way more than 8 seconds for little gain.

The Page View information is available through Canvas Data. However the data there is not current, running about a day or two behind real-time. It also has limited availability and requires additional resources to analyze. Page view data still occurs when a student does something. If they're not doing anything, there is nothing to record.

Finally, links to URLs that are contained within assignments or pages are not included here. The External URLs are just those that are linked to items in modules, not a link in a page full of instructions.

Raw Data

Okay, you've installed the script, clicked the button, and opened the file in Excel. Now what?

Well, you get a bunch of raw data that will need manipulated before you can tell anything useful. It looks pretty intimidating, you have a report that looks like this (and this is just the first 10 rows).

Excel Raw Data

Note that the SIS Login and SIS User ID may not be there, depending on the permissions you have within Canvas.

Where did all this come from?

It turns out that Canvas actually provides more information than it shows on the page you get when you ask for the Access Report. Canvas displays the HTML version with just the highlights and in a form that is easy for humans to read. It also provides the data in JavaScript Object Notation (JSON) format that is much easier for a computer to deal with. Canvas internally calls these items assets, and that gets reflected in the naming of the item.

Here's what that first entry looks like in JSON.

{
"id":123456789,
"asset_code":"discussion_topic_11319205",
"asset_group_code":"topics",
"user_id":1278402,
"context_id":1785810,
"context_type":"Course",
"last_access":"2016-02-12T21:31:11Z",
"created_at":"2016-02-10T20:12:45Z",
"updated_at":"2016-02-12T21:31:11Z",
"asset_category":"topics",
"view_score":2,
"participate_score":null,
"action_level":"view",
"summarized_at":null,
"display_name":"Discussion 4: Hypotheses and Errors",
"membership_type":"StudentEnrollment",
"readable_name":"Discussion 4: Hypotheses and Errors",
"asset_class_name":"discussion_topic"
}‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

What's being displayed in the HTML version of the report is contained are the asset_class_name, readable_name, view_score, participate_score, and last_access. The User's name is displayed at the top of the report, but the user_id (1278402) can be used to identify the student (in this case Cubic Dream) and the user script merges the user information and the access data together into a usable format for the user. By the way, all of the user data have been anonymized, but the assignments and access data are from my actual class. Cubic Dream isn't my student's real name and 1278402 isn't Cubic's real Canvas User ID.

Data Dictionary

In statistics, I emphasize the importance of having a good data dictionary. You need to know what the values represent.

  • User ID is the Canvas User ID. Everyone has one. Most people won't find it extremely interesting, but in the case of multiple students with the same name, it can help tell them apart.
  • Display Name is name of the student that is displayed in Canvas. It's normally in First Last format, like Cubic Dream or Skinny Record.
  • Sortable Name may not be available to you. There is a feature that your Customer Success Manager can enable that will allow you to list names in Last, First format like Dream, Cubic or Record, Skinny. If it's enabled, this provides you with a quick way to sort alphabetically by last name.
  • Category corresponds to the asset_category_type of the Access Report data. It includes things like announcements, assignments, collaborations, conferences, external_urls, files, grades, home, modules, quizzes, roster, topics, and wiki.
  • Class corresponds to the asset_class_name of the Access Report data. It includes things like announcement, assignment, attachment, content_tag, discussion_topic, google_docs_collaboration, quizzes/quiz, student_enrollment, teacher_enrollment, and wiki_page. Generally, there is a one-to-one correspondence between category and class, but some things like the roster category are broken into student_enrollment and teacher_enrollments for the class name.
  • Title is the name of the content. In the Access Report data, it's called the readable_name There was a display name as well, but it was sometimes blank and when it was there, it mostly matched the readable name.
  • Views is the number of times the student viewed the content. For discussions, this would be the number of times they went in and viewed the discussion. This is the closest most people will get to the number of messages they read, but it's the number of times they went in, there is no guarantee they actually did anything past opening the page.
  • Participations is the number of times the student participated. For discussions, this would be the number of posts they made.
  • Last Access is the last time the student viewed or participated. It is converted to the local time according to the browser.
  • First Access is the first time the student viewed or participated. It is converted to the local time according to the browser.
  • Action is either view or participate. I'm not exactly sure on this, but I think it corresponds to the last access.
  • Code is a unique identifier for each piece of content. It contains the type of content plus the Canvas ID. For example, assignment_8556874 identifies this as assignment with a Canvas ID of 8556874. That is not very useful for faculty, but if someone was trying to link all the data together for advanced reports, it may be.
  • Group Code is another way of categorizing the data that most people will ignore. The group doesn't refer to Groups in the normal sense, but is some way to organize the data. For example, there is an assignment_group_### group code field that appears to represent which assignment group the item belongs to. That means you could, with additional information, break it down by whether the assignment was homework, exams, projects, etc., depending on your assignment groups. On the other hand, every single code beginning with wiki_page_ belonged to the same wiki_ group code (at least for my course).
  • Context Type should be Course or Group and relates to the Context ID to determine exactly which course or group.
  • Context ID is the Canvas Course or Group ID for the course. It is used in conjunction with the Context Type.
  • Login ID is what the user uses to log into Canvas with. For us, it's their NetID, but it could be an email address.
  • Section Name is the name of the section the student is enrolled in. This may be a delimited list if the student is in more than one section. See the multipleSections configuration variable for more information.
  • Section ID is the Canvas ID for the section the student is enrolled in. This may be a delimited list if the student is in more than one section. See the multipleSections configuration variable for more information.
  • SIS Course ID is the Course ID supplied by your Student Information System (SIS). This column may not be there if the person requesting the Access Report doesn't have access to the SIS information from Canvas. It's a permissions issue and the script runs as the person calling it.
  • SIS Section ID is the Section ID supplied by your Student Information System (SIS). This column may not be there if the person requesting the Access Report doesn't have access to the SIS information from Canvas. It's a permissions issue and the script runs as the person calling it.
  • SIS User ID is what your SIS knows the person by. For us, it's an integer that uniquely identifies the user. This column may not be there if the instructor doesn't have access to the SIS information inside Canvas.
  • Last Activity is the last time the student accessed the course as explained in How do I use the People page in a course as an instructor?  It is converted to the local time according to the browser.
  • Total Activity is the total time in decimal hours as explained in the Canvas Instructor Guide. Instead of giving hours:minutes:seconds, 3:12:15 becomes 3.21 hours.
  • Current Score is the current numeric score for the student in the course.
  • Current Grade is the current letter grade for the student in the course. This is only available if a grading scheme has been set.
  • Final Score is the score the student would get if all ungraded assignments were given a 0. This is disabled by default.
  • Final Grade is the letter grade the student would get if all ungraded assignments were given a 0. This is disabled by default.

Note that section information was added after the original script was released and are not included in the videos.


Drilling Down to Specifics

Some questions can be answered using just the raw data.

Format as a Table

If you're going to examine the raw data, you will want to turn it into a table first. To do this, go to Home > Format as Table or Insert > Table. This allows you to filter or sort on a column, which will greatly increase your productivity later.

Who participated in a discussion?

Let's say we wanted to know who participated (and how many times) in Discussion 3.

I purposely started this one off in a novice way, to show what people who may not be familiar with Excel can do. There are more efficient ways of doing this.

  • You can sort by the title by clicking in the Title column and going to Data > Sort > A-Z. An easier way is to click on the down arrow on the Title heading at the top of the table and choose Sort A to Z.
  • Doing that may overwhelm you with information so you can use Ctrl-F to find the one you want. But once I did that, it turned out that Discussions are in there twice, once as a discussion and once as an assignment. This is a problem when you have multiple contents with the same name, so sorting by title may not be the best solution.
  • You can filter the Category (choose topics) or Class (choose discussion_topics). To do this, click on the appropriate heading at the top and un-check the ones you don't want.


Who viewed an external URL?

You'll want to sort by title to group the content together. You could use the Code to group, but it wouldn't be alphabetical.

I then used filters to select the external URLs. Those can be found under Category (external_urls) or Class (content_tag) and found the one I was looking for.

Show Me!

Here is a video walk-through of the three items mentioned here.

Summary Reports

Sometimes you want a broader picture than just what a student did on a single assignment. To accomplish these, you'll need to create a Pivot Table.

Create a Pivot Table

To create a pivot table, you need to go to Insert > Pivot Table and click OK.

Once you're there, you will probably want to drag the Display Name or Sortable Name down to the Rows so you can break things down by students. Every one of the items in this section starts off the same way.

Pivot tables allow you to insert slicers to quickly filter the data or time slicers to view data over a particular time period (you must have a date/time field to do this, but we have first access and last access to pick from)

Analyzing Discussions

This whole Access Report project grew out of a desire to know how many times students had gone into the discussions and at least viewed them.

What I'd like to know is how many times did a student view or participate in a discussion this semester.

  1. Choose Insert > Pivot Table
  2. Drag the student's name to the Rows
  3. Drag the Participations to the Values. Excel wants to do "Count of Participations" instead of "Sum of Participations". You can change this in several places, but double clicking on the heading of the table is probably the quickest. Change it from Count to Sum and then change "Sum of Participations" to something else. You might want to use "Participations", but that's already used, so you have to pick something else.
  4. That gives the participations for the entire course. You could add a filter on the right side, but a faster way is to choose Insert Slicer from the top. This gives a nicer interactive menu where you can immediately click and limit your data.
  5. After looking at Participations, you can do the same thing with Views. Drag it to the Values box, where, thankfully, it comes through as a sum. I would change the title from "Sum of Views" to something else, like "View"
  6. You can sort the data by clicking on the Row Labels pull down. The default A to Z and Z to A are for the data in that column, but you can choose More Sort Options and tell it to sort by another column
  7. To break the report down by the discussion, you can add another slicer for the Title and then look at participations and views one discussion at a time.
  8. If you decide you want to look at all of the discussions, then drag Title to the Columns selector on the right side. You'll need to turn off the filter on the Title if you do this.

Here is a video that shows all of that in action.

Filtering by Time Period

The Course Roster (People) page shows you when the last activity of a student was and the total amount of time spent in the course. It does this in alphabetical order. Unfortunately, last activity could be just logging into the course, it doesn't mean they did anything else once they got there.

As a side note, if you have installed my Sort a Roster Canvancement, then you can click at the top of any column to sort by that column. You can find sort by section, by the time they last accessed the course, or even by the total amount of time spent in the course.

You can filter the information in the Access Report Data spreadsheet by time.

  1. Choose Insert > Pivot Table
  2. Drag the student's name to the Rows, and both Views and Participations to the Values. As before, change the heading "Sum of Views" to just "View" and the "Count of Participations" to Sum instead of Count and then change the title to "Participation".
  3. Click on Insert Timeline and choose Last Access.
  4. Change the slider from Months to Days and then highlight the date range to restrict the report to.
  5. You could add filters (through the Slicers) to limit what kind of activity you want to look at.

Remember that only students who have data for that time period will show up. There is no easy way to get a list of students who aren't doing a particular thing.

Here is a video that walks you through the report.

Quick Tables

A quick table is a table that shows you information about a particular area. What we're going to do here is break down the information by the Class. You could just as easily choose the Category and some might find it more useful.

  1. Choose Insert > Pivot Table
  2. Drag the student's name to the Rows, the Title to the Columns, and Class (or Category) to the Filters.
  3. Draw Views and Participations to the Values. Rename Views to be V (yes, just a single letter). Change "Count of Participations" to Sum and then rename it to just be the letter P.
  4. Rotate the titles in Row 4 so that they are vertical. Do not just click on Row 4, it doesn't work; you need to select the cells and then do the rotation. To rotate the text, click on the Orientation icon from the Home screen and choose Rotate Text Up. You may also want to Right align all the text from columns B on, although it may not really matter if you use a single letter for Views and Participations.
  5. Be prepared to be wowed!
  6. Click inside the pivot table, then at the top click on PivotTable Tools > Analyze. On the left, choose the pulldown menu next to Pivot Table Options (don't click on the word Options). Then click Show Report Filter Pages (this won't be available if you forgot to put something in the Filters box on the right). Then choose the filter(s) to use and click OK.
  7. What you get is a page for each type of content. The name of the student is on the side and the name of the content is across the top. This allows you to quickly (hence the name Quick Table) look at discussions or quizzes or external URLs or anything else in the class that is available.

Here is a video that shows all of this in action.

Viewing Who Has Not Participated

As mentioned above, what we are looking at is the Access Report data and it doesn't include information about students who are not engaging in your course. Luckily, there is one checkbox in Excel that we can check to get that information. The student will have needed to do something, anything, so that their name is in the Access Report data, but then we can see what they have not done.

  1. Choose Insert > Pivot Table
  2. Drag the student's name to the Rows
  3. Drag the Participations to the Values. Excel wants to do "Count of Participations" instead of "Sum of Participations". You can change this in several places, but double clicking on the heading of the table is probably the quickest. Change it from Count to Sum and then change "Sum of Participations" to something else. You might want to use "Participations", but that's already used, so you have to pick something else.
  4. Choose Insert Slicer from the top and add slicers for Category (or class) and Title. Choose the content you want to view. What you currently have is a list of those who have participated.
  5. To get the list of those who have not participated, click on the student's name from the Rows field and choose Field Settings. Then click on Layout & Print. Check the "Show items with no data" and click OK.
  6. If you like, you can go to Data > Sort > A to Z to bring those who have not participated to the top.

Here's a video showing how it works.

Updating the Script

Tampermonkey should attempt to update this script automatically for you. In case you have turned off that functionality or would like to update sooner, you can click on the Tampermonkey icon and choose Check for userscritp updates.

The update process keeps your local settings and shows the changes to the code for you to decide whether to upgrade.

Canvancements

This script is a Canvancement -- a Canvas Enhancement. The links in the document point to an installable version of the code, but there is an Access Report Data project page as well that contains the source code as well as a version that you can use to anonymize the names like I did for the videos. Other projects, like the Roster Sorter that was mentioned here can be found on the Canvancement website as well.

203 Comments
James
Community Champion
Author

 @linda_osullivan  

I'm glad you resolved your own question and that it works for you.

James
Community Champion
Author

 @lindalee  

I went into our faculty training course and found something big enough to cause the problem. 


Things were going along great and then all of a sudden, the calls to fetch the data started getting 403 Forbidden responses. When I looked at it, the x-rate-limit-remaining was running out. That's a known consideration with API calls, but this wasn't an API call. It is intended to keep someone from hammering the system too much. I had thought since the browser was limiting the number of calls to about 6 or 7 at a time that it wouldn't be an issue.

The big impact seemed to be the call to get the students. The remaining limit was 700 when it was started and it took 3.12 s to return and the remaining limit was down to 120 when it finished. The next one had only 40 remaining. That was a fetch to get the usage for a user, but since the remaining limit was so low to start with, it eventually ran out of remaining limit and stopped working.  Some of the calls got through (black in screenshot), but a lot were blocked (red in the screenshot)

347751_pastedImage_2.png

The fix is for me to pay attention to the the x-request-cost and the x-rate-limit-remaining and throttle my requests when it starts to run low. One way to do that is to fetch less data with each request. I was maxing it out at 100, but it might be friendlier to make 5 requests at 50 each than 3 requests of 100 entries each.

It also looks like Chrome is making a lot more than 6 concurrent calls.One more recent post I found said it was 10, but it still looks like a lot more that are happening at the same time.

347752_pastedImage_3.png

That can also lead to the need for throttling.

Basically, I need to slow it down for large classes in order to get everything.


I noticed that I'm using jQuery's AJAX call. I will probably rewrite it to be pure JavaScript.

Finals are done for me now and I have some other backlogged things I've been putting off, but I'll see what I can do. I know a lot of people like this script.

a_wong
Community Novice

Hi James

I am fairly new to Canvas and definitely like this script. This is exactly the level of detail of student access data that we need (and be able to download them in bulk) not only for reporting purposes of student engagement (especially during the COVID-19 situation) but also the starting point of undertaking some forms of learning analytics to better use data to make evidence-based teaching and learning decisions.

However, I came across similar problems encountered by @Linda J. Lee. I am able to download the report for a class of 18 students with 1009 observations. However, I won’t be able to download the entire dataset for a class of 60 students. I was only able to download data for 45 students with 6256 observations. I have got classes as large as 400 students with over 12 000 observations.

Your knowledge of how to slow the script down for large classes would be very much appreciated.

Many thanks. Amy

James
Community Champion
Author

 @a_wong ,  @lindalee 

I'm making progress. I have incorporated bottleneck, which is a throttling JavaScript library I use in a Node JS application I have. I can limit the number of simultaneous connections, but more importantly, how long it waits between requests. Canvas imposes a penalty if too many requests come in the same time and that seems to hurt more than the number of simultaneous requests.  Up to 50 requests at a time with a 25 ms delay between them seems to work, but I may make that 40 and 30 ms to be safe. I have some playing around to do to optimize the numbers while playing nice with Canvas.

The course I'm playing with has about 335 students with up to 261 assets (although not all have that many). That's potentially 87,435 items, although it won't be nearly that big. At 30 concurrent requests with 40 ms throttling, I made 461 requests in about 21 seconds for about 22 requests per second. The x-rate-limit-remaining never went below 451. At 40 concurrent with 30 ms throttling, I made the 461 request in about 17 seconds or 28 per second. It seems that it's the delay between requests that is the limiting factor for right now. The x-rate-limit-remaining never went below 443. Still, that's sensitive to the load on the servers and when I was debugging the other app using bottleneck, I thought I had it worked out until one night when I didn't. I backed off pushing so hard, going for all the data but slower.

Amy's 400 students with 12000 items should be simple. That's 4 API calls to get the class list and 400 non-API calls to get the student usage.

I switched out the API call used to get the enrollments. I was using one that listed all of the students in a section, but it would take 3-4 s to download that first part before I could get started. Now I'm using the course enrollments, which allows me to get started faster but requires more API calls. I'm currently downloading the usage reports for the first batch of students whereas it was waiting for all of the students to download first before even beginning the other. That makes it harder to know exactly how many students there are unless I download a few at a time, but then it takes longer to get them (but is less likely to tax the API). Anyway, that messes up the progress bar.

Another benefit is that I now have access to last_activity_at, total_activity_time, current_grade (if there is a grading scheme), and current_score. I'm thinking about adding those as fake assets. I know I could use it and Kona says she would definitely use it, too.

It seems there is a demand for a roster download, which is a subset of this report (without the access report data) so I might as well go ahead and do it while I'm at it. I'm trying contemplating the best way to accomplish that. Separate scripts? separate buttons? I can imagine a demand for a roster report that included the four new items without the access report data.

I need to figure out the progress bar and a dialog without using jQueryUI (eventually Canvas will get rid of it), although it would be easiest to leave it as is for now. I also modified the way the data was stored, so that I could output the results by student, but I really don't think that's necessary.

Anyway, the time has been spent focusing on getting all of the data and now I need to focus on delivering it. Well, it's 4 am and I need to focus on going to bed.

One thing I haven't spent a lot of time on is what happens when students are enrolled in multiple sections. For now, I'm just taking the first one, but should you duplicate the data or make a comma separated list of sections? The whole comma-separated thing doesn't work well in pivot tables, but if Johnny is in three sections, how important is it that his information in be in there three times? I'm using the section to identify the student, not to do comparisons between sections, although some people might want that.

a_wong
Community Novice

Many thanks James. Very much appreciated that you have looked into my question so promptly. I have just found another class with 400 students but has over 500 titles that expand the items to 200 000+… hope by increasing the non-API calls will fulfill this request but I will leave this to you for consideration. Thanks again.

James
Community Champion
Author

I guess the hope (from a programming perspective) is that not every student will look at every asset. Obviously that's not desirable from an education perspective.

Canvas did just make available an Access Report at the admin level. When I read the announcement about it, I felt it was terribly limiting (must be ran by admin and only goes back 1 month) and not as helpful as my script. But you're making the case for why it might be necessary. Canvas couldn't put my script inside the browser because it takes a while to run and it kind of taxes their system when it runs quickly. Something like this really should run in the background, but since it's a non-API call to get the data, it makes it difficult for regular users to do that.

a_wong
Community Novice

Totally agree and understand from both the programming and practical perspectives. I definitely do think your script is much better than the Canvas Access report, as one-month of data is nowhere near sufficient to make any reliable analytical decisions.  Going with your example of 335 students with up to 261 assets will satisfy the requirements for most courses. Many thanks.

James
Community Champion
Author

May 19, 2020

I've done a major rewrite of the script.

  • It now uses a throttling library to play nicer with Canvas. Large courses were getting inconsistent results because the requests were failing. Requests shouldn't fail, but if they do, I throttle it even more and then try to repeat the failed requests.
  • I added the Last Activity and Total Activity Time from the People page to the report.
  • I added the current course score and current course grade to the report (the grade is only available if you're using a grading scheme).
  • I modified the quiz views to match what Canvas gives. In the data supplied, they count taking a quiz as a view, but they subtract that off in the online access report. My data now matches theirs.
  • I check the permissions of the user to make sure they can generate a report and don't add the button if they cannot. Previously, students could add the access report, it just didn't give them any information. Now it doesn't even show the button.

This is a major rewrite and updating will show a lot of changes. There is a good chance that any local customization you have done to the script will be lost. Those using a non-instructure.com domain for Canvas may need to reset their // @include line on line 5 (see the custom URL section of the instructions).


I used the throttling to slow things way down and the script ran for about 4.5 minutes on Chrome without any issues. That was 5 concurrent calls with 500 ms between requests. The defaults are 40 concurrent calls with 30 ms between requests and that took me about 20 seconds for the same amount of data. You can tinker with the configurations to make it go even faster, but I felt reliable and reproducible was better than more important than fast, incomplete, and inconsistent.

The data will only include students who have actually had access, which is why I didn't include invited (but not accepted).

I've tested this with the biggest class I have access to.  @a_wong  and  @lindalee , please let me know if it works for you.

Some day soon, I will strip the guts out of this and make a Roster report that gives the same information but without the access report data. That would be the student information, their analytics, and their grades. It's really just a subset of this report, so it shouldn't take long. If there are bugs with this report, I'd like to know about it before I gut it to write the other.

ProfessorBeyrer
Community Coach
Community Coach

 @James  Thank You! I installed the new script and love the inclusion of the total activity and course score. 

a_wong
Community Novice

 @James  Many thanks.

I have run the modified script on both small and large classes in my environment. The exported csv only contains the following headings with no data underneath each column as follows: 

348128_AccessRtv13data.png

The network activity for a small class (18 students with 108 assets) when I ran the report.348129_AccessRtv13network.png

Any advice to move forward would be very much appreciated. Many thanks again, Amy.

James
Community Champion
Author

 @a_wong  

Are you saying that's the network activity (that one line) and that the progressbar never advanced? Can you click on the entry and then choose Preview and see what information was returned.

Can you set the debug configuration option to true and try it and see what it does?

My "nextHeader" code is convoluted to try to get the progress bar to work properly. It's possible that something there is off. 108 is in that area where there are 2 requests needed at 100 each to get them all. Can you try changing the per_page=100 on the usage request to per_page=50 so there will be more requests.

Are you a Canvas admin or someone with a lower level of access like a teacher?

whitlod
Community Novice

Hey James,

I'm a graduate TA for a large lecture class at the University of Washington. I have been using your script (and then writing my own data-wrangling script in R) to assign points for online discussions in a class of ~120. Your script has been an absolute lifesaver for me as I try to complete my thesis on time, so I just wanted to reach out and thank you personally. As we approach late in the quarter, the throttling issue did cause students to be missing (I first noticed it yesterday), but now I've run your new version and manually checked that every student was there. It seems to work great!

Thanks again!

James
Community Champion
Author

I thought I was done with updates a week ago. As I started writing the Roster Exporter, I installed a new linter to check for crud and subtle issues with the code. It turned up a lot of little things and at least one place where I was using an array when I thought I was using an object. Since the code for the Roster Exporter was borrowed heavily from this script, I took the time to go back and fix the code in this one. Now I need to fix the code in the Roster Exporter before I release it.

Here are some of the changes for version 15 of this script.

  • The file is now sorted by the sortable name, when present. Version 14 sorted it by the Canvas User ID.
  • Promises now work in the code. Version 14 relied on Bottleneck's idle function to kick in, but it might have triggered before all of the fetches were done.
  • The script can now handle students enrolled in multiple sections of the course. You can generate a delimited list of sections, duplicate the information for each section, or just return the first section found.
  • The script now only tries to fetch usage information when there is a last_activity_at date. That is no guarantee that there is an access report, but I never found an access report without having a last activity date.
  • The script can now hide empty columns with no data. Previously, this was only for SIS data unless you edited the code.
  • The script can be run correctly without reloading the page. Previously it appended the data, so if you ran it twice without refreshing the page, the data would be there twice.

I found out that there was some data loss with really large classes (I was testing it with one that had 10k+ students) and that the retry on the failed attempts wasn't working properly. At this time, the best remedy is to reduce the number of concurrent calls being made. I was using minTime=30 ms and maxConcurrent=40, but shrank the maxConcurrent down to 25. It added a couple of seconds to my test course with 300 students but kept the course with 10k students from timing out.

James
Community Champion
Author

Just coming back to this for those left wondering whether the issue was resolved or not.

Amy and I moved the conversation private so we didn't cloud this discussion with the back and forth and the issue was resolved. I was thinking that every enrollment would have a login_id associated with it, but that wasn't the case. In version 15, I completely reworked the way I was determining what data so that I didn't have to inspect the data to know what kind of data it was and that completely eliminated the place where the issue was occurring.

ignacio_martine
Community Member

Hello @James ,

Thanks for sharing this documentation, James. The report is very useful!

I was wondering if there is a way to get a similar Access User Report for teacher activity?

Thanks,

Ignacio

James
Community Champion
Author

@ignacio_martine 

That depends on what you want. There are two things I've seen people want out of this and both have been discussed before.

Getting the teacher's activity within a single course is a relatively easy modification (change a few lines of the script). Some people wanted to know what the TAs were doing in their class or even instructors when being active in the course is part of their job requirements.

The other option is to get the instructor's activity across all courses to see what they are doing in Canvas. Perhaps to answer the question of whether the instructor is doing anything at all? This was discussed relatively early on in this thread and I wrote a proof of concept script, but it was way too slow to be useful and I didn't keep it up to date.

ignacio_martine
Community Member

Hi @James

Thank you for the reply! I was able to change the script to get the teacher's activity report!

Best,

Ignacio

Chris_Munzo
Partner
Partner

Perhaps something like this?

Chris_Munzo_0-1602875594843.png

 

rao_3
Community Explorer

I am wary of using TamperMonkey because it is closed source, but requires basically full access to do what it does. I finally managed to install it in ViolentMonkey by pasting the sourdecode in. But it would be nice to do this as easily as with TamperMonkey. Anyway to do that?

Nath Rao

James
Community Champion
Author

@rao_3 

I do not use Violentmonkey. The documentation on their website wasn't very helpful in answering this question, so I went to their source code. There are several places where user.js is found, so it might support clicking on a file that ends in user.js to install it.

If you follow the two steps in the instructions (replacing Tampermonkey with Violentmonkey) and it does not automatically install, then perhaps it is in a setting? For Tampermonkey, there is a setting (in Advanced mode) that allows script URL detection. It is set to Auto, but can be disabled. Perhaps Violentmonkey has something similar?

sharinahmad
Community Explorer

This is very useful! Can it also display the no of views for a URL inside a Page? Thanks

James
Community Champion
Author

@sharinahmad 

Canvas does not track links to external content from within pages, only links within Canvas, so this script cannot give you that information. You should use some other method to determine if a student has clicked on an external link.

It will track links that are added as external URLs to the modules page, but if you include the same link within the body of a page (content page, assignment, quiz, or discussion), then it will not track it. 

This script uses the same data that the Access Report inside Canvas uses, it just automates it to give you an entire class at one time. If it does not show up on the access report for an individual student, it's not going to show up here.

 

JohnDowis
Community Explorer

I am having an issue this semester where one of my courses is not showing the "Course Score", but my other course is. I used the script last year and didn't have this issue.

Thank you for this, it has been incredibly useful in our virtual school.

Edit: I solved my own issue. I needed to turn on the setting "Automatically apply grade for missing submissions" so that every student has a grade. I suppose if there are any students with a blank grade then it will not create that field/column in the report.

Doc_Brown
Community Member

This is brilliant. Some of the simple things that Canvas chooses not to include like being able to get this data for more than 2 weeks back baffles me, but I'm glad there's always someone with the know how to add the features we need!

Eve
Community Member

James -- thank you so much for this extremely helpful information and tool.  I have a question about the "Code" data field -- in the course access report.  Sometimes I cannot readily tell what page a student has viewed by the Title alone -- is there anyway this "code" field can help me find the page/content in the relevant course -- or any other way to find the specific page/content the student has viewed?

Thanks much

James
Community Champion
Author

@Eve 

Yes, they can be used.

If your titles are not unique, you're going to run into problems as Canvas requires that they be. However, if you're using unicode or special icons in the titles, then I'm not sure how that would factor in. If it's a problem with the full title not showing, then you can widen the columns in the spreadsheet (click at the top between any two columns and drag the width -- between F and G in the image I have in the documentation).

That said, every content page has a Canvas ID associated with it.

When my title is "Taxi Rides", the code is "wiki_page_23405978". The wiki_page_23405978 is a combination of the class (wiki_page) and the Canvas ID for the wiki page (23405978). If I go to the pages navigation menu in Canvas and add /23405978 to the end of it and hit enter, I will get the "Taxi Rides" page. The URL should end in /pages/23405978

When I send data to my wife in a spreadsheet, she often wants me to have a URL so that she can jump directly to the item in question. I would use that with wiki_pages because the URL isn't given and there are a set of rules about converting titles into URLs and it's easier to use the Canvas ID than it is to repeat all those rules.

I did not create links to the items, but I often wish when I view Canvas' access report that I could click on the title and jump to the item, so I can see where it would be helpful to some.

Eve
Community Member

Thanks James -- this helped me find the pages I was looking for.

 

 

seberry
Community Explorer

Why does CANVAS not provide this data? 😡

JohnDowis
Community Explorer

I have been using this for 2 years now and it has become essential for me. However, I am having a problem I have never encountered.

My largest class is truncating the CSV towards the bottom of my roster (currently the W's). I have tried Chrome and Firefox, and it truncates at around same place (line 41050ish on chrome, 41094 on Firefox). I have tried changing the minTime to 500 and maxConcurrent to 5 and it did not make a difference, ending at the exact same place. This only started happening today from what I can tell.

Another interesting facet is this isn't even close to the largest class I have had, with a class almost twice as big last year never seeing this issue.

Edit: I noticed that the list is getting longer throughout the day as more students participate in the course, but still stopping after the same student every time. The last report I did is going to 41170. Is there something throwing a wrench into the process with one of the students?

Edit 2: I also noticed that the next student on the list after it is cut off is a student with 0 course interactions (access report is blank). Could this be the issue or is it a coincidence? Why didn't it happen until now?

Edit 3: I spoke to Canvas support and they do not see anything wrong with the particular student that would cause an error, but the ticket is still open.

Edit 4: Fixed in the post below. Thank you @James!

James
Community Champion
Author

2022-05-22 Update (version 16):

This script got bit by a missing "last" link pagination issue, which might explain what @JohnDowis is seeing. When loading the list of students, if there were more than 40 students, it was failing to load the last page of students beyond a multiple of 20. For example, if you had 57 students, then it would load 1-40 correctly, but miss students 41-57. In my testing, those were the last 17 students alphabetically by the sortable_name (typically last, first), but don't hold me to that.

Canvas warned people to follow the "next" link in the link header in order to get the next page. I coded for that possibility, but I wanted to speed things up so I used the "last" link if it was present so that I could send requests concurrently and get all of the users and their enrollments quickly. If there are 10 pages of users, then I fetch the first one, see that there are 10 pages of users and then concurrently fetch pages 2 through 10 rather than waiting to download one to start the next.

Canvas started using bookmarks with the enrollment information, which means that the requests have to be done serially. I wasn't using the enrollment information directly, I was using the list of course users and told it to include the enrollment information.

At some point, and given the two complaints I've gotten since May 12, it may have been recently, Canvas started omitting the "last" link through the list of course users. This is regardless of whether you include enrollments or not. In my testing, the link for the last page doesn't show up until the next-to-last page is fetched.

My script had a fallback. If the last link wasn't present or it wasn't numeric, then it would continue to fetch the pages sequentially. The problem was on the next to last page when the "last" link started showing up. Now there was a "last" link and it was numeric, but it wasn't showing up on the first page. My script checked that the next page was page 2 and if it wasn't, then it didn't try to speed up the process, it just disregarded the next link since it had already requested it. The end result was that the very last page of students was getting ignored.

I only had to modify one line to remove an else statement and replace it with an if condition to make it work, and that's what version 16 does. There were a few other changes to improve Tampermonkey lint warnings.

I've started rewriting the code as there were lots of other small things that could be cleaned up. They don't add any new functionality: it's just cleaner code.

I did notice that the progress meter shoots to 100% really quickly now and then it sits there and waits so long that you might think the script has stopped working. I'm fairly confident that's related to the not knowing how many API calls it needs to make since the number of users is unknown until the end. I start fetching usage data as soon as it has the first page and those can still be made concurrently, it's just the number of users in the course that fails. I did not attempt to fix that for this patch, just be patient for large classes.

There may be other scripts I've written that fail that are related as I used that same code in other places. If you find something, let me know.

Again, version 16 is a minor tweak that fixes the missing last page. The major code cleanup and progress meter fix will have to come later, but I wanted to get this fix out there quickly.

woodsdm2
Community Contributor

@James 

This is a wonderful tool, and I have been using it for several years.

Today, I tried to use it on some courses from the 2017-18 academic year and when I visit the people page, the "Access Report Data" option wasn't on the dropdown menu.  I checked the script on a class from the semester that just ended, and the option was available and the script ran as expected.

I did a little more explanation and it looks like the menu option is available for courses in the current academic year, but not for older courses.  Do you have any idea how I might get this to work for older courses?

 

Thanks!

James
Community Champion
Author

Is the information available for the individual access reports for the older class (not my script) for the older course?

There's nothing in my script that checks for it being an active course vs a completed one.

JohnDowis
Community Explorer

@woodsdm2 

 

This is not an answer to your question, but something to be aware of when you are looking at older data. I found this out accidentally while trying to "historically" check my attendance records.

Access reports lose accuracy (and therefore usefulness) over the length of a class term due to the way Canvas reports activity. For any given activity a student participates in (a page view or a quiz, for example) Canvas will overwrite any previous instances of that activity with a new date rather than create a new instance in the log. For example, suppose a student opens a study guide on Monday. This activity will appear in the log for Monday. Then on Tuesday they briefly open the study guide again before doing their test. The activity that was previously showing on Monday will be moved to Tuesday, and Monday will appear as if the student did not log in at all. This is again due to the way Canvas records activity. Trying to look back at an entire semester doesn't necessarily give an accurate picture, especially if students tend to revisit previous activities for any reason. I suppose the usefulness depends on your use case.

woodsdm2
Community Contributor

@James  - the individual access reports are also gone, so it looks like Canvas deletes this data at some point.  I guess I need to get in the habit of running your access report at the end of the semester in case I find a need for the data later.

 

@JohnDowis - thanks for the tip.  This is useful.  In this case, I was just looking to revise an older course and wanted to get an idea of how many students actually accessed some of the content, so I think the limitations wouldn't really affect this use case.

probinson1
Community Participant

This. Is. Fabulous.

Mei_Mei
Community Member

@James Thank you so so so much!!! I just successfully fetched the data, but I ran into an issue: the Title column is showing some kind of garbled text like this Á¨¨‰∏ÄÂçïÂÖÉÔºöÂçïÂÖÉÂ≠¶‰π†‰∫§ÊµÅÂà܉∫´.

The title in this class is in Chinese, I guess it is because the Chinese characters can't be fetched by this script? But I don't know how to modify the script as I have no technical background. Can you please inform me of that? Any help would be much appreciated~ 

James
Community Champion
Author

@Mei_Mei 

A CSV file is essentially a text-only file. While I haven't tried it, the most likely solution is to add a byte-order-mark to the beginning of the file.

When you go to your Canvas Account > Settings and scroll down, there is a feature to add the Byte Order Mark for compatible reports so they can be imported by Excel in certain locales.

That certainly sounds like the solution to what you're experiencing.

My script does not check that setting or add the BOM (it can cause problems for software that doesn't expect it), but it gives us a place to start looking. 

I'm on vacation this week with the family and don't have time to look into it right now, but I'll try to get back to you after I get home and have time to explore.

In the meantime, you may be able to save the CSV file to disk rather than opening it directly with Excel. Then in Excel, you can open the CSV file and specify that it has Unicode (UTF8) encoding. Again, I haven't tested this, but here are some directions on importing the UTF8 CSV file.

Mei_Mei
Community Member

Thanks! @James I was able to import the CVS without the garbled characters using this method: https://support.collaborativedrug.com/hc/en-us/articles/115004625563-CSV-import-in-Excel-with-garble...

Basically, instead of opening this CVS directly, I have to import this CVS and choose the UTF-8 encoding before opening it~ 

Again, Thanks! Have a great vacation! 

 

NathanArnold
Community Member

Hi James,

Thanks so much for this! Is there a way that you know of to get a report of each time that a student accessed a particular page, rather than just the first and last access?

James
Community Champion
Author

@NathanArnold 

The information of when each student accessed a page is not available through the Access Report; it is only for summary purposes.

Most people would recommend looking at the Page Views, but that is enormous and it's not easy to break out just the page views from all of the other noise. Doing so would require using Canvas Data to be effective.

I would recommend looking at Canvas Data Services Live Events. You set up an AWS SQS queue and then tell Canvas to send a notification every time a certain event happens. I've been collecting data on views (assignments, pages, navigation) for a couple of years now and the cost is usually less than $2 a month (we're a small community college), but the point is that it is pretty cheap. You have to poll the queue to get the information. Alternatively, you could set it to send the information directly to your host and then get it in near real time.

The Live Events makes a best-attempt at delivery. If AWS is down of Canvas is super busy, the notification may be lost. It doesn't happen often, but you should have a backup if it is really, super important that you capture every event.

Another approach is to download the access report daily and archive them. Then you can go through and check and see what has changed. I wouldn't really consider that since it's a lot of work, but if you're a teacher and not someone with database or programming expertise, it may be your best shot at capturing that information.

TamzRoll
Community Novice

Hi James. Is there any reason from your end that this might not be working? I have used this over and over and love it. So useful. With much gratitude. Cheers

James
Community Champion
Author

@TamzRoll 

It still works for me. Do you have the latest version of the script? I updated it May 22, 2022, to fix some missing data issues and it's now up to version 16.

probinson1
Community Participant

Hi James,

LOVING this script!

Is there a way to do a drill-down of one of the external (Canvas Studio) links? Track views, length of viewing, etc?

Thanks again for this, and especially for your video walk-through's.

Polly

AdrGau
Community Explorer

hi @James James - I'm so happy this script/method still works so many years later! I've used it previously, and in my new job we had a need and we're thrilled!

Thank you for making this available!

Quick question -- the class or category columns aren't containing any "external_url" clicks as your demo shows.  Any ideas on what's happening or something we've missed?

~ Adrienne

 

James
Community Champion
Author

@AdrGau 

Are you sure that there are external urls on your modules page? Canvas does not track external links within pages or assignments, just those from the modules page.

I just downloaded the access report for one of my spring courses that I know had links on the modules page and they showed up in the access report.

AdrGau
Community Explorer

@James 

D'oh! Yes, yes indeed Canvas does not track clicks to external links from a page. I knew that, but my hopefulness overtook my common sense. We are interested in that b/c we link to resources in Shared Drives (which the Google app does not allow), so are looking for other ways to get that data.

Thanks for the quick reply! I was too hopefully excited.

mikeg
Community Participant

This script was immensely useful and really saved my butt. 

 

I do have one question, are Discussion Board "Likes" recorded?  I'm trying to evaluate student engagement on DB and the only activities that are recorded in the csv file your script generates are views and participation (= DB postings)

HilaryColeman
Community Member

Hi James/community,

this looks like it has sorted my exact question (and saved hours of work) - many, many thanks! 

Is this script still running effectively? I'm having installation difficulties - happy to press on if the issue is on my end, but will search for other solutions if the script is no longer current.

Either way - thank you! 

Hilary

James
Community Champion
Author

@HilaryColeman 

The script still works for me using Tampermonkey and Chrome -- just tested it in a small course before I responded.

That said, there is an announcement that Tampermonkey will soon require developer mode be enabled in Chrome, but I think that's a forewarning rather than being enforced.

You didn't say how far you were getting. Some early problems involve making sure that Tampermonkey is showing up and enabled. If your Canvas instance isn't <school>.instructure.com, make sure you change the match statement on line 5 of the code. You should have a red badge with a number at least 1 (depending on how many scripts you have) on the People page. If you don't have any, then my script isn't even recognized.

HilaryColeman
Community Member

@James thanks so much for the speedy reply - age old trick of computer off and on and now it's working. Thank you so much! This is definitely going to save many hours of work and hopefully inject some sanity checks into institutional assumptions about online student behaviour. Can't thank you enough!