Daniel Puperi

Downloading discussions from Canvas

Discussion created by Daniel Puperi on Mar 22, 2018
Latest reply on Mar 23, 2018 by Stuart Ryan

For the purpose of accreditation, I needed samples of students' work which demonstrated certain learning objectives.  Much of those samples of work were in discussion posts on Canvas.  It is easy to download all submissions of student work from Assignments, but there is no easy way to download discussion posts in the same way.  I browsed through the Canvas community ideas and found a couple of posts that had mentioned the desire to download discussion posts for various reasons.   In the comments in the "Download discussion board posts" idea, one user posted a link of how we could use the Canvas API to get a JSON formatted file which contained all the posts from a discussion.


This was a start, so I wrote my own Python script to take that JSON file and parse it into individual HTML files for each student -- using the same format as downloaded text-entry Canvas assignments.


I didn't mess around with authorization in the script - the user has to download the JSON file on their own, but then can run the script on the JSON file and get the posts into the HTML for each student.


I put the script on github in case anybody else might want to use it.  I had just replied in the comments for the idea, but Stefanie Sanders suggested I share the script here as well.  Here is the link to the github project:


GitHub - dsp444/save_canvas_discussion: Tool to convert JSON formatted discussion posts on Canvas LMS into HTML files - … 


It's a Python script that needs to be run from the command line, so its not for everybody, but I put it on github in case it is useful for somebody.