This script will delete the contents of a course without deleting the course shell. This updated script also features a graphical user interface that will make it easier for users to interact with the script.
- Python 3.9 or later - can be downloaded from here
Please ensure that the Add Python 3.X to PATH checkbox is checked
- Canvas API Token
- The course ID of the course you are resetting
Ex. For https://canvas.ubc.ca/courses/1326, 1326 is the Course ID
- Log in to Canvas.
- Click on Account on the Global Navigation menu.
- Select Settings.
- Under the Approved Integrations section, click on the + New Access Token button.
- In the pop-up window, fill in the Purpose field.
- Click on the Generate Token button.
- Copy and paste the token provided to you onto a secure text file on your local machine.
Note: Once you close this window, you will not be able to access this token again. Therefore, a new token will need to be generated if you lose your current one.
- Clone the repository into your local computer.
- Install the libraries needed by running a pip install in the terminal.
pip install -r requirements.txt
- Open the
accesstoken.py
file using Notepad or Visual Studio Code. - Copy and paste your Canvas API Token in the
access_token
field. Then, save the file. - Right-click on the
main.py
script and select Edit with IDLE > Edit with IDLE 3.10.
- Click Run > Run Module.
- Fill in the prompts in the application window and click Submit to proceed with the course reset.
- Once the script has finished running, a pop-up window will show a summary of what has been deleted. There is also a Go to Course button that will redirect you to the Canvas course page so that you may review the course.