Skip to content

ubccapico/extract-discussion-posts

Repository files navigation

Scrape Discussion Script

Introduction

The purpose of this script is to provide an easy way for instructors to track each of their student's discussion posts (both comments and replies) from every discussion topic in Canvas, without having to do it manually through the Canvas Interface.

Main Features

  • Creates an HTML File for every student in the class
  • Each student's HTML files lists all their posts on each of the discussion topic in their course
  • Each post contains the discussion topic in which the post is from, the date the post was made, and the post text.
  • There is also a quick summary at the top of each HTML file, in case instructor only cares about the number of posts made by the student.

Requirements

How to get a Canvas API token

  1. Log-in to canvas.ubc.ca
  2. Click on "Account" on the left hand Global Navigation menu
  3. Click on "Settings"

settings

  1. Scroll to the very bottom of the page, then click on the new_access_token button
  2. Provide a purpose under the "Purpose feed", then click on "Generate Token"

access-token-window

  1. Copy and Paste the token provided to you onto a secure/encrypted text file in your local machine. Once you close this window, you will not be able to access the token again, so please be careful where you save your text file.

access-token-details

How to run the script (MAC Only)

  1. Open the "main_app.py" with your python 3 IDLE
  2. Click on "Run" then Run Module (the shortcut key for this is the F5 key)
  3. If it ran successfully, a window will open:

scrape-discussions-window

If you encounter any errors, please contact [email protected]

  1. In this window, enter the course ID, the base URL (in the requirements section), and your Canvas API token
  2. Click on Ok
  3. Wait until the message below the "Ok" and "Cancel" says "Done"
  4. The HTML files will be in a folder in the same directory as the script, titled with the course you extracted the discussions from

How to run the script (can for Windows)

Open the the main_app.exe file, folow steps 4-7 from the steps above.

About

Developed by Jon Guarin, Ed Tech from Arts LC

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published