Skip to content

Uploading Syllabi to Firebase Cloud Storage

Rothanak So edited this page Apr 3, 2024 · 1 revision

Syllabi are stored as PDF files on Cloud Storage for Firebase. Uploading a syllabus to Cloud Storage automatically triggers the syllabus registration process.

Step 1. Download

Download the user-submitted PDF from the Dropbox (or other source) to your local computer. I find it helpful to keep two folders: one for syllabi that have yet to be uploaded (the "inbox"), and one for syllabi that have been successfully uploaded to the server.

Step 2. Rename the file

Rename the file to follow the format {Course}_{Term}{Year}_{Professor}.pdf. This will cause the syllabus to be attached to any sections that match that course code, semester, and professor. For example:

  • CAP4630_Spring2021_Dutta.pdf
  • COP3855_Spring2023_Umapathy.pdf

Note: If you have multiple syllabi for the same course/semester/professor but they're for different sections, you can optionally specify the {Days}{Time} on each syllabi to attach them to the relevant section. For example, a syllabus named COT3100_Spring2019_Getahun_TR1630.pdf will only be attached the T/Th 4:30pm section, and not any other sections. This is fairly uncommon, but comes in handy if you have multiple submissions.

Step 3. Upload the file

Navigate to the Cloud Storage environment in production, and navigate to the /inbox folder. Click on "Upload file" or drag your file in to upload it to the folder. There is a cloud function, registerSyllabi.ts, that listens for changes in the background. If there's any matching sections, it'll automatically update the course document to link to the syllabus and move the file from the /inbox into the /syllabi folder!

Troubleshooting

If the syllabus file is still in the inbox after refreshing, that could mean one of four things:

  1. There are no matching courses in the database (most common)
  2. The matching courses already have a syllabus file associated to them
  3. There's a typo or something wrong with the syllabus file name
  4. The sync process is on fire
Clone this wiki locally