This application extracts syllabi from Canvas, determines if it is a link to the PDF or a Canvas Page, downloads the syllabi, and generates a list of all courses (with instructor names) that do not have a syllabus specified.
These instructions will get you a copy of the project up and running on your local machine for use with your own API tokens and Canvas domains.
- Install Node 8.0.0 or greater.
- Install Git.
- First, clone this repo.
git clone https://github.com/UBC-LFS/lfs-canvas-syllabus.git
- Then cd into the repo.
cd lfs-canvas-syllabus
- Run the installation script.
npm install
(If you seebabel-node: command not found
, you've missed this step.) - Create a
.env
file.touch .env
. This is where you'll specify the URL and token as show below. Don't add quotes. You can swap out the domain if you want to run it off production.
CANVAS_API_TOKEN=PLACE YOUR TOKEN HERE
CANVAS_API_DOMAIN=https://ubc.beta.instructure.com/api/v1
- Run the script.
node getSyllabi.js
- Input the year you are interested in (if you are interested in more than one year, you'll need to run the script more than one time).
- Select the terms you are interested in. You can select multiple terms by pressing
space
. If you want to select all the terms, leave the default selection of 'All of them'. - Input the account number of your Faculty. If you don't know what your account number is, go here and click your Faculty. Then the URL will contain the account number at the end. For LFS, it's 15.
- Go for a coffee. Depending on how many terms you select, and how many courses you have under your account, and how many files each course syllabus has, this could take some time.
- The syllabi is now downloaded in
output/syllabi
, inside folders that indicate what year/term the course was offered.
- Run the script.
node getInstructors.js
- Input the year you are interested in (if you are interested in more than one year, you'll need to run the script more than one time). 'All of them'.
- Input the account number of your Faculty. If you don't know what your account number is, go here and click your Faculty. Then the URL will contain the account number at the end. For LFS, it's 15.
- Select the terms you are interested in. You can select multiple terms by pressing
space
. If you want to select all the terms, leave the default selection of - Go for a (quick) coffee. Depending on how many terms you select, and how many courses you have under your account, this may take some time.
- The
instructorsWithNoSyllabus.csv
file should be created underoutput/instructorsWithNoSyllabus/
.