How to remove in Access Report list jpegs/pngs?

Jump to solution
aperez1
Community Novice

Hello,

My Access Report list is filled with meaningless information like names of images (png) I put in pages/assignments etc.  How can I remove images from list of Access Report?

Here is an example:

353984_pastedImage_1.png

0 Likes
1 Solution
James
Community Champion

 @aperez1  

There are a few options, none of which you will like.

  1. Live with it.
  2. Stop using little icons in your course, then they won't be accessed by students and show up in the access log.
  3. Use a script that downloads all of the access reports for an entire class into Excel and then you can filter by type (eliminate all files). Obtaining and using Access Report data for an entire course
  4. Open up the developer tools in your browser (F12 for Chrome or Firefox), go to the Console tab, and paste the following code in. For Chrome, hit enter; for Firefox, hit Ctrl+Enter. It will hide all the lines that have names ending in .png

document.querySelectorAll('#usage_report tr.attachment .name_holder').forEach(e => { if (e.textContent.trim().match(/\.png$/)) { const r = e.closest('tr'); r.style.display='none'; } });

You can make number 4 permanent by installing a UserScript manager like Tampermonkey and then creating a script that runs that automatically. That's not trivial, but it's not too bad unless the content isn't ready on the page when the script runs -- it's not in this case. That means you'll have to wait for the content to download before you can modify it and that does make it considerably harder than just the code above.

Oh, I forgot to mention that if Canvas ever changes things on that page, the script may stop working. They normally don't, but it's a possiblility so I thought I should mention it.

View solution in original post

0 Likes