Autograder Integration

Allows staff members to add an autograder link to each assignment that makes an HTTP request containing student submissions to the link supplied.

Configuring the autograder



On the assignment edit page, enter a URL (including the http/https prefix) that all newly submitted files will be sent to. Only the newest files will be sent with each HTTP Request. You can also add an authentication token for security checks. To set up an Autograder for an assignment, an Autograder URL and Authentication token must be provided in the assignment definition.

If there is no Autograder URL, then there will be no Autograder functionality.

If there is an existing Autograder URL, then the system will send an HTTP POST request to the auto grader URL whenever a student or group submits an assignment.

Format of the Request

The Autograder expects no response, sends only the newest files for an assignment and is of content-type multi-part/form-data with only a single boundary(boundary can be found in the content-type header).

The body will contain the form data with the following parts.
  • auth_token - Authentication token used for security checks (max 36 characters)
  • netids - NetIDs of the group members. Alphabetical order, separated by '_'
  • group_id - ID of the group the submission is for
  • assignment_id - ID of the assignment
  • assignment_name - Name of the assignment
  • num_files - Number of files submitted
For each of the i files submitted, there are the following parts:
  • problem_name_i - Part stores the name of the problem the ith submission is for
  • file_name_i - Part stores the name for the ith uploaded file
  • uploaded file (value for file_name_i) - The encoded uploaded file with a Content-Disposition name that is the same as the name stored in file_name_i. The name is the same as if it had been downloaded from CMSX.

Note: The counter i starts at 0 for the first file

Below are examples of potential parts of a request body (note that the lines above and below each part are not part of the actual request body and only for visual effect in this document).

An authentication token part may look like:

--boundaryID
Content-Disposition: form-data; name="auth_token"

The authentication token


A problem part may look like:

--boundaryID
Content-Disposition: form-data; name="problem_name_0"

First_File


An encoded file part may look like:

--boundaryID
Content-Disposition: form-data; name="First_File"; filename="First_File.pdf"
Content-Type: application/octet-stream

< Encocoded unreadable file >
Sample Submission Data
  • auth_token - "super_secret"
  • netids - "acm22_ath55_gn93"
  • group_id - "341"
  • assignment_id - "21"
  • assignment_name - "Assignment 1: Intro to CMSX"
  • problem_name_0 - "Part 1 of the Assignment"
  • problem_name_1 - "Part 2 of the Assignment"
  • problem_name_2 - "Part 3 of the Assignment"
  • file_name_0 - "Part_1_of_the_Assignment"
  • file_name_1 - "Part_2_of_the_Assignment"
  • file_name_2 - "Part_3_of_the_Assignment"
  • Part_1_of_the_Assignment - File uploaded for part 1
  • Part_2_of_the_Assignment - File uploaded for part 2
  • Part_3_of_the_Assignment - File uploaded for part 3