WebSubmit
Steven Zeil
Abstract
websubmit
is an online service that permits ODU CS students to submit their assignments. It supports assignments with multiple files, limits on the number of submissions, automatic notification of the instructor, and the launching of an automatic grading program after each submission.
It also allows students who have completed an assignment to request access to a posted solution, but preventing them from resubmitting once they have seen the solution.
1 Overview
websubmit.cgi
is a script that permits ODU CS students to submit their assignments via the web. It provides an alternative to the rather simple assignment submission provided by Blackboard with additional features including:
- A submitted assignment can contain multiple files.
- The instructor can specify the name expected for each file.
- Instructors can be notified via email whenever a student submits.
- A program (e.g., an automatic grader) can be launched following each submission.
- The total number of submissions per student on an assignment can be capped.
- Students can review the latest grade report posted for an assignment.
- Students can view, after a specified date, the instructor’s solution to the assignment.
2 A Walk-Through of the Assignment Submission Process
The instructor prepares, for each assignment, a configuration information file that provides, at a minimum, an assignment title, a directory where the submissions are to be placed, and a list of file “filters” (e.g., adt.h
, *.cpp
) describing what students may submit.
The instructor then makes available to the students a web page containing a link that invokes websubmit.cgi
with the path to that configuration file supplied as the “asstinfo
” parameter. For example,
https://www.cs.odu.edu/~zeil/submit/websubmit.cgi?asstinfo=/home/facultyName/Assignments/asst5.xml}
A student clicking on that link will be prompted to log in with their CS Dept credentials.
2.1 Making a Submission
After a successful login the student is presented with information about any prior submissions to this assignment and an option of submitting (or resubmitting) the assignment, of viewing the last grade report, or of viewing the instructor’s solution.
Let’s assume that the student wishes to make a new submission.
After clicking on the “Submit” button, the student is presented with a list of files the instructor expects to be turned in for this assignment
The student can then use the “Browse…” buttons to select the files to be turned in. When all is ready, the student can press the “Submit Assignment” button to complete the submission.
The student is then presented with a summary of the files turned in, and a button to close the browser window.
2.2 Walkthrough: Viewing Grade Reports
Instead of submitting an assignment, the student may opt to view the most recent grade report. Within the overall grades directory specified as a configuration property, the instructor may provide this as a file named studentLoginName.* or as a file named gradeReport.txt
inside a directory named studentLoginName.
If provided as a single file named with the student’s login name, the file may be supplied as a .txt
, .html
, .pdf
, or .xls
file.
2.3 Walkthrough: Viewing Assignment Solutions
Instead of submitting an assignment, the student may opt to view the instructor’s solution. This option is offered only if the instructor has provided an on-line solution. Also, the instructor can restrict this option to be available only after a specified date.
If the student requests the solution, then the contents of the instructor’s solution directory are displayed. Students can view the individual files by clicking on the file name links. If the instructor has placed an {\tt index.html} file in the solution directory, the contents of that file are shown alongside the directory listing.
3 Setting Up Assignment Submission
To set up an assignment and allow students to submit their solutions, the instructor creates a configuration file describing the assignment and of the files to be submitted.
3.1 The basics
Here is the configuration file for the example presented above.
title: A Major New Initiative
submissionLimit: 3
notify: zeil@cs.odu.edu
directory: /home/zeil/courses/cs361/AutoGrading/sum16/Submissions/assoc_majors
#
file1: courseCollections.h:1:Your declaration of the course collection types.
file2: courseCollections.cpp:1:Function bodies associated with the course colleciton types.
file3: catalog.cpp;1;Your implementation of the course catalog.
file4: README.txt;0;Notes to the grader, if any.
#
solutionDirectory: /home/zeil/courses/cs361/Build/Assignments/sum16/assoc_majors/Solution
solutionDate : 8/06/2016
gradesDirectory: /home/zeil/courses/cs361/AutoGrading/sum16/Grades/assoc_majors
grader: /home/zeil/bin/requestGrading.pl /home/zeil/courses/cs361/Build/Assignments/sum16/assoc_majors/assoc_majors.pl
This is a “properties” file, usually stored with a file extension .ini
. (This format was introduced in late 2016. The earlier, XML-based format, is still supported for backwards compatibility, but did not offer support for course defaults, described later.)
Each line defines a single property, in the format
propertyName : value
Lines marked with # are comments.
-
The
title
is required. It identifies the assignment to the student. -
submissionLimit
is optional. If provided, this places a limit on the total number of times a student may submit an assignment. This is particularly useful if “on-demand” or automatic grading is employed to give students rapid feedback on their work. -
notify
is optional. If provided, it should indicate an email address to which a message will be sent whenever a students submits for this assignment. -
directory
specifies where student submissions for this assignment will be placed. Normally, each assignment would have a separate directory. -
One or more files, to be submitted by the student, can be given as
file1
,file2
, … Each file description is given in three parts, which can be separated by colons, semi-colons, or Tab characters.-
A “filter” gives a pattern for the file name. These are currently treated as suggestions but not enforced.
-
The second element indicates whether the file is reauired or optional. A 1 means that it is required, 0 means that it is optional. Students can submit despite missing a required file (because students do sometimes need to submit incomplete work), but they are warned about missing required files.
-
The final element is a brief description of the content of the file.
-
-
solutionDirectory
is optional. If provided, it specifies the locations of an instructor’s solution to be shown to students who have completed the assignment. -
solutionDate
is optional. If it andsolutionDirectory
are provided, then the solution is not made available for viewing until the date given here. -
gradesDirectory
is optional. If provided, it specifies the location where the grade reports for each student will be placed. -
grader
is optional. If provided, it denotes a command that will be executed after each submission. (TherequestGrading.pl
command shown in the example schedules a future run of an automatic grader for programming assignments.
When a student submits an assignment, the assignment is saved within the directory named as the directory
property. The student’s first submission is placed within a directory studentLogin.0/
and the time of submission in a file studentLogin.0.time
, the student’s second submission goes in studentLogin.1/
and studentLogin.1.time
, and so on.
No provision is made for students’ withdrawing old assignment submissions because I don’t believe in destroying the “audit trail”. Also, no provision is made for limiting submissions to before a “due date”, because any such mechanism would inevitably require frequent overriding to accomodate excused late submissions, students working off incomplete grades, etc.
3.2 Security
Security of student submissions stems from two features:
-
The login requirement for the submit script itself, which requires a valid CS Dept account.
-
The
websubmit.cgi
file itself is hosted on the Dept.’s secure http server, and runs under group “faculty”. As a rule, therefore, all directories and files used bywebsubmit.cgi
, including the submission directory and the submission information file itself, should be readable (and, for directories, executable) by group faculty but not by the world.
3.3 Optional Features: Solutions and Grading
The above sections describe the main features of websubmit
, but I have found it useful to add two particular extensions. Instructors can use these or ignore them, as they choose.
3.3.1 Setting Up Assignment Solutions
websubmit
can be used to reveal instructors’ solutions to students. Although this is easy enough to do by posting a solution online, dealing with students who have been given permission to turn work in late or who are working off incomplete grades is something of a problem. How do you reveal a solution to the bulk of the class without revealing it to everyone?
websubmit
can serve up solution files from an instructor-desginated directory. This directory must be readable and executable by group “faculty”, but not by the world. A student who requests access to the solution directory will not be allowed to subsequently submit to that assignment.
To designate a solution directory, add a solutionDirectory
property to the configuration file. You may optionally restrict that solution to be unavailable until a certain date by adding a solutionDate
entry.
3.3.2 Setting Up Automatic Grading
Finally, websubmit
can invoke a designated program or script each time an assignment is made. The intention is for that program to trigger automatic grading of the assignment. The program to be invoked is specified via a grader
property.
The text of the grader
entry will be passed to the shell for execution, with two additional command arguments appended:
- the student’s login name, and
- the directory within which the submitted files have been placed
A few notes for instructors wishing to take advantage of this feature:
-
The grading script should, in most cases, fork off a background process to do the grading. Presumably, that process would notify the student of the results by email. The reason for doing this in the background is that, except in very rare circumstances (e.g., the programs are very simple and you know that no student will write an infinite loop), you can’t be sure that grading could be completed within the 2 minutes or so that a browser will allow before timing out on a CGI request.
-
Having a CGI script that can launch an arbitrary command supplied from an external source could be a major security risk. To relieve this, the permissions of the executable file or script listed in the
grader
entry are checked. The executable must be readable and executable by group “faculty”, but is not allowed to be readable, writable or executable by the world.
4 Setting up Course Defaults
If a course has many assignments, the submit configurations are likely to share a lot of information. It is possible to factor out that common information into a “default” properties file to reduce the amount of information that must be provided in the individual assignments.
For example, I would typically keep each assignment in a separate directory, but store the default information in the common parent directory of all of the assignments.
For example,
cs361/Assignments/sum16/semester.ini
submissionLimit: 3
notify: zeil@cs.odu.edu
sem: sum16
#
agBase: /home/zeil/courses/cs361/AutoGrading/latest
directory: @agBase@/Submissions/@asst@
gradesDirectory: @agBase@/Grades/@asst@
asstBase: /home/zeil/courses/cs361/Build/Assignments/latest/@asst@
solutionDirectory: @asstBase@/Solution
grader: /home/zeil/bin/requestGrading.pl @asstBase@/@asst@.pl
cs361/Assignments/sum16/assoc_majors/assoc_majors.ini
defaults: ../semester.ini
title: A Major New Initiative
asst: assoc_majors
#
file1: courseCollections.h:1:Your declaration of the course collection types.
file2: courseCollections.cpp:1:Function bodies associated with the course colleciton types.
file3: catalog.cpp;1;Your implementation of the course catalog.
file4: README.txt;0;Notes to the grader, if any.
#
solutionDate : 8/06/2016
This example illustrates the main features that support setting up semester-long defaults:
-
Each assignment configuration file can specify a
defaults
property containing a relative path to a shared default properties file. -
Properties not used directly by
websubmit
(such assem
,asst
, andasstbase
above) can be freely added. -
Property values can contain references to other properties inside either the assignment or default configuration files. Those references will be replaced by the appropriate values.
-
For example, the property
solutionDirectory
is given a default value of@asstBase@/Solution
. -
asstBase
is defined in the default property file as/home/zeil/courses/cs361/Build/Assignments/latest/@asst@
, making the value ofsolutionDirectory
/home/zeil/courses/cs361/Build/Assignments/latest/@asst@/Solution
. -
But
sem
is defined in the default file assum16
andasst
is given in the assignment file asassoc_majors
, so the final value ofsolutionDirectory
is/home/zeil/courses/cs361/Build/Assignments/sum16/assoc_majors/Solution
.
-