There are six programs used in conjunction with the submit program for student submissions of programming projects. These programs are submit submit-copy submit-unpack submit-test submit-score submit-readme Each of these programs is discussed in turn. Submit can be found in /usr/local/bin. The other programs can be found in ~lusth/bin/. ------ submit ------ The submit program exists in /usr/local/bin and is the program students use to submit their programs. Running submit without arguments gives a usage message, as in: Usage: submit The submit program tars up the current directory recursively, then copies the tar file to a fixed place in the instructor's home directory, which is accessible only to the instructor. The program will inform the student if it fails. The instructor sets up a directory structure off his or her home directory. The root of this structure is the class name, with a subdirectory called "submissions". The submissions directory should be read/write/executable only by the instructor. Inside the submissions directory, a subdirectory for each assignment should be created. Typically, these subdirectories are called assign1, assign2, and so on. Here is an example directory structure: ~lusth ~lusth/csce4613 ~lusth/csce4613/submissions ~lusth/csce4613/submissions/assign1 ~lusth/csce4613/submissions/assign2 ~lusth/csce4613/submissions/assign3 To submit the third assignment, a student would run submit thusly: submit csce4613 lusth assign3 Suppose the student's login was "jones". Then the file "jones.tar" would be placed into: ~lusth/csce4613/submissions/assign3 ----------- submit-copy ----------- The submit-copy program is the other half of the submit system. All instructors keep a copy of submit-copy in their personal bin directories. To get a copy of submit-copy, simply run the command: cp ~lusth/bin/submit-copy ~/bin/. Then change the permissions to be set-uid to you, as in: chmod +s ~/bin/submit-copy The instructor should make sure that submit-copy is readable/executable by others or else the submit program won't be able to exec the submit-copy program. This means the instructor's home directory as well as the instructor's bin directory should give read and execute permission to others. ------------- submit-unpack ------------- The submit-unpack program automatically unpacks the tar files submitted by students. Suppose, the directory... ~lusth/csce4613/submissions/assign1 ...has the following tar files in it: abel.tar jones.tar smith.tar Running the command submit-unpack *.tar will result in the following directory structure DATES NAMES abel/ jones/ smith/ The DATES file contains the dates and times of submission for each student. The NAMES files contains the login names of each student. This file will be used by the submit-test program. The subdirectories, in this case abel, jones, and smith, contain the untarred tar files submitted by abel, jones, and smith, respectively. ----------- submit-test ----------- The submit-test program doesn't actually test the student programs but rather builds test scripts. It is executed by the command submit-test where is the directory name originally given by the students to the submit program (i.e. assign1, assign2, assign3). The outputs is five test scripts, called go1, go2, go3, go4, and go5. The go1 script compiles the student programs. If a file BUILD exists in the current directory, the go1 script uses the commands in that file (one command per line) to build the students programs. If the BUILD file is missing, student programs are built with the command: make -i The -i option is important, since output from make is redirected to a report file named .rpt where is the login of the student whose project is being compiled and tested. Once the BUILD file is set up properly, the students programs are built by executing the command: go1 The student logins needed for go1 are found in the NAMES file, which is created by submit-unpack. The go2 script does the testing of the student programs. It is a requirement that a file named COMMANDS exists in the current directory. The submit-test program pulls commands (one command per line) from this file to build the go2 script. Here is a typical COMMANDS file: echo first test... echo echo your version echo db ../test1 echo echo my version echo ../db ../test1 echo echo second test... [more commands follow] Presumably, the executable for this project is named "db" and the instructor's version is the assignment directory (just above the student's directory). If the command begins with echo, the go2 script echoes whatever follows to the screen and to the report file. Otherwise, the command is executed and the output placed into the report file. The wise instructor requires that student programs can be manipulated in such a manner. The student reports that are created by go1 and appended to by go2 reside in the top of the assignment directory. The go3 program appends a file named NOTES to the student reports and then copies the reports to their respective directories. The NOTES file contains common errors and their deductions to remind the instructor to look for these errors and to save the instructor from typing in the same comments again and again. Typical comments found in the Notes file are stylistic comments, such as: Work not signed, deduct 2 Javadoc comments missing, deduct 4 If the comment does not apply, the instructor removes it. In grading the reports, if the instructor uses the "deduct n" format, the submit-score program (see below) can automatically tally the deductions and produce the final score for the submission. The go4 script copies the student reports back up the the assignment level and then runs the submit-score program on each report. The go4 scripts assumes scoring out of a possible 100 points. The instructor should edit the go4 script if a different total is desired. The go4 script then extracts the scores from all the reports and places them in a file named SCORES. The go5 script mails the final reports back to the students. Presumably students have set up .forward files on their accounts so that they will get the reports sent to the places they usually read mail. ------------ submit-score ------------ The submit-score program is invoked automatically by one of the testing scripts (see above), but there are a few things of interest. The program simple-mindedly searches through a file to find the keyword "deduct". The keyword "deduct" must be whitespace delimited. The number following the keyword is subtracted from the current score, as in... deduct 5 The initial score defaults to 100. Extra credit is achieved by deducting a negative number, as in... deduct -2 The score can be scaled by the phrase scale score by where is a percentage. The final score is written to stdout. To run the program with a different total, give an extra argument, as in submit-score 50 jones.rpt where 50 is the total number of points and jones.rpt is the file containing the deductions. ------------- submit-readme ------------- Displays this text.