SUBMIT(1R) NAME submit, cksubmit, unsubmit - submit course assignment files to the instruc- tor SYNOPSIS submit [ -v ] acct assign file ... cksubmit [ -v ] [ -x ] acct assign unsubmit [ -v ] [ -d dir ] [ -o filename ] stuacct DESCRIPTION Submit allows students to hand in assignments electronically, while pro- tecting the instructor's files from unwanted snooping. The acct argument gives the name of the instructor's login account (or perhaps a class account). Submit searches file `.submitrc' in the login directory for acct looking for a line of the form assign submitdir flags Assign is the assignment name given on the command line, and submitdir is the pathname of a directory where submissions for the assignment are to be stored. Flags are optional comma-separated flags which control the way in which submit performs its archiving. Currently, the only flag value which is recognized is old, which causes submit to refrain from compressing its archives. (This option is provided for backwards compatability with older versions of submit, and may disappear in future versions. The cksubmit and unsubmit commands, described below, also recognize the distinction between compressed and uncompressed archives.) The directory pathname may be absolute, relative to the login directory, or it may employ the '~' convention of the C shell. In any event, the path- name must select a directory to which the specified acct has read, write and execute access. Normally the directory will be owned by the instructor and will be securely protected against outsiders (mode 700 is recommended for paranoids). If the directory is accessible, the submission is logged in subfile LOG:assign, and an archive file whose name is composed of the submitter's account name and the suffix ".Z" is created. Next, the UNIX archive pro- gram tar(1) and the compression program compress(1) are called to place the named files into the compressed archive file. If one of the files is a directory, its contents are (recursively) placed in the archive. Only files readable to the submitting account can be archived. Note that the archive itself (and thus its contents) are the property of the instructor. The optional argument -v causes the tar program to provide `verbose' out- put, echoing each file's name as it is placed in the archive. Cksubmit allows students to verify the contents of a previously-submitted assignment. The output from cksubmit is a list of all files submitted to acct as assignment assign. The -v argument causes the list of files to con- tain, in addition to file names, the sizes and modification times for each entry in the archive. The -x argument causes cksubmit to extract a copy of all submitted files into the current directory, allowing the submitter to verify that the submitted files are, indeed, what was intended (e.g., that all source files were submitted for a programming assignment.) Note that this option is best used in a directory other than the original source directory if verification is intended. The -x option implies -v. Unsubmit allows instructors to easily extract student submissions for grad- ing, examination, etc.; in particular, one can run a multitude of tests against student programs, or perform statistical analysis to detect cheat- ing. The submission for student stuacct, located in the current directory in a file named stuacct.Z if compression is being used (the default), or file stuacct if the `.submitrc' file specified no compression, will be uncompressed and extracted. The -v argument specifies that a list of all files extracted is to be produced at the terminal. Ordinarily, files are extracted into the current directory; the -d dir argument specifies that the extracted files are to be placed into the specified directory. If not all files are desired, the -o filename argument can be used to specify that only the indicated file is desired. EXAMPLES Suppose instructor `foobar' expects two assignments called 350lab1 and 350lab2; the student projects for these labs are to be stored in subdirec- tories 350/lab1 and 350/lab2, respectively. Then the .submitrc file in foobar's login directory would look as follows: 350lab1 350/lab1 350lab2 350/lab2 If student `abc9876' wants to submit files part1.p and part2.p for assign- ment 350lab1 he would execute a command equivalent to submit foobar 350lab1 part1.p part2.p If all is kosher, this creates an archive file `abc9876.Z' (containing copies of the two submitted files) in foobar's subdirectory 350/lab1. File LOG:350lab1 will have an entry appended to it for this submission. Student `abc9876' then decides to verify the submission, and enters the command cksubmit foobar 350lab1 which produces the output part1.p part2.p verifying that both source files were recieved by the instructor. (If the student is still not satisfied, he can execute the commands cd otherdir cksubmit -x foobar 350lab1 to extract a copy of the files in another directory, and can go on to recompile the program to verify that all components are present in the sub- mitted version.) Instructor `foobar' can then extract the submission from student `abc9876' with the command unsubmit -v -d stu/abc9876 abc9876 which will place all submitted files in the subdirectory `stu/abc9876'. AUTHORS Michael J. Lutz (submit), Warren R. Carithers (cksubmit, unsubmit) FILES /etc/passwd account information on the instructor and the student. .submitrc assignment/submit directory pairs LOG:xxx log on submissions for assignment xxx; found in submit directory for xxx. lck:xxx lock file to synchronize logging for assignment xxx; found in submit directory for xxx. tmp:# temporary file used by the locking protocol (where `#' is the process id). stuacct file containing latest submission by the student whose account name is stuacct. This is in the submit direc- tory for the appropriate assignment. SEE ALSO tar(1), setuid(2), compress(1) BUGS Logging requires interlocks to prevent race conditions; if the locks cannot be set in a reasonable amount of time (15 seconds) then the submission will not be recorded in the log file. This is a `soft' problem since the infor- mation itself will be archived under the submitting user's name. There is no way to append information to a submitted set of files. The entire set must be resubmitted. There is no way to have several versions of the information submitted for an assignment. If two assignments use a common directory, and a given student submits both assignments, only the last one will be saved. As a corollary, if the same assignment is submitted twice, only the last version will be saved.