Web Submission Toolkit

Axel T. Schreiner
rev. 11-23-01

This is a collection of tools to accept a ZIP archive of files through a form on a web page and store them in a submission tree owned by the instructor.

Form

The form (sample) can be placed on an arbitrary web page. It specifies hidden variables course and assignment which should not contain blanks, slashes, or consist of one or two periods. It specifies a key which is concealed as it is typed in. A key should consist of exactly five digits and it should uniquely identify a student. Finally, the form specifies a file input field, for which a file selection box will pop up. The student should create a ZIP archive with files to be submitted and this archive should be selected in the box. The form must post a multi-part message to the CGI script.

CGI Shell-Script

The script (sample) is placed in ~/public_html/bin/submit where it is accessed by the form. It runs Parse to extract the multi-part message and store to store the ZIP archive. If the input is not acceptable the script returns an error page. Otherwise store returns a listing produced by unzip.

Parse

This is a Java program which is based on the activation (1.0.1) and mail (1.2) extensions. The class file and the extensions must be placed where the CGI script can execute them. The following properties can be defined:
binary=true
to permit binary file content to be submitted.
dirs=number
to restrict the number of directories in the submission to less than number.
files=number
to restrict the number of files in the submission to less than number.
size=number
to restrict the size of each file in the submission to less than number bytes.

store

This is a C programm which must be setuid-ed to the instructor and placed where the CGI script can execute it. A path prefix SUBMIT and the location of unzip are compiled into this program. It uses the value of key and course to find an e-mail address in the data file at SUBMIT/lib/course.data, and it uses the value of assignment to store the ZIP archive at SUBMIT/submit/course/assignment/e-mail.zip. The file will be owned by the instructor and it cannot be created if the directories do not exist; thus, an assignment need not be accepted late.

Data File

The data file must contain lines with a five-digit key, a tab, and an e-mail address; other lines are ignored by store. The data file should be readable only by the instructor and it must be placed as described above.

Submission Tree

The submission tree should be accessible only by the instructor and it must be placed as described above. As long as a course may submit an assignment those directories must exist.