SyncFire

A technical blog for developers

30 Mar 2021

Automated Gradescope Submissions

The Problem

The upgrade from our university’s websub system to gradescope looks and feels great for sure, but the approach of having to upload your files each time or maintaining a separate GitHub repo for each assignment is a pain. The whole process gets even worse when you have to deal with folders within your assignment.

TL;DR

Solution!

We have developed a tiny python script that will upload all the files in the folder it’s placed in as a submission to gradescope.

Demo

P.S After 0:21, please extend to the end, gradescope just takes too long to finish grading and I was too lazy to trim the video.

Setting up the submission script

  • Step 1: Download the submit.py file from this Github repository.
  • Step 2: Copy the submit.py file to your assignment directory.
  • Step 3: Install requests_toolbelt,
pip3 install requests_toolbelt
  • Step 4: Open the file and edit the following as per the setup video embedded below:
assignment_url = ""
authenticity_token = ""
cookie = ""

After this process, you can simply run the following command to make a submission to gradescope. No zip files, No folders, No confusion!

python3 submit.py

Note: You will need to repeat steps 2&4 for every individual assignment/practical.

Feel free to use the discussion forum below for any queries!

comments powered by Disqus