Department of Electrical Engineering and Computer Science



Submit Scripts

The EECS IT Staff has written a very generic submit script that should be useful to most classes where files need to be submitted to teaching assistants (TAs) for grading. The script will prompt for confirmation that the current directory contains the files to submit, the number of the lab, and the appropriate lab section. The files in the user's current directory (and subdirectories) will be tarred, gzipped, and emailed to the TA as a MIME attachment. The submission will also be logged to a central server for verification purposes. The user will be sent an auto-reply email if the TA has a proper procmail recipe. The script can also be run with command-line switches if the user prefers not to submit interactively.

 

Information for Students

Submitting Your Files

To submit your files to your TA, use the submit script for your class. The script name will be in the form of classnumber_submit (e.g., 360_submit300_submit).  For CS 494/594 classes, the class number will also have two descriptive letters (e.g., 594np_submit for 594 Network Programming). The submit script packages up all of the files in the current directory and emails them to your TA.

There are two ways to run the submit script: interactively and non-interactively. The following is an example of the interactive version of the CS 360 submit script.

prompt> 360_submit
You are about to submit a lab for 360
Make sure you are in the directory that contains the lab
you want to submit. Your current directory is:
/home/lab_user/cs360/lab1
Is this the correct directory? (y/n):y
Please enter the number of this lab:1
Please choose which section to submit your lab.
Choice Section Number TA Username Class Time
------ -------------- ----------- ----------
0 001 ta1 M 9:05
1 002 ta2 M 11:15
3 003 ta5 T 3:35
Please choose the section of your lab: 1
Tarring up files...
Tarfile finished
Mailing tar file to ta1
This lab has been submitted wait for an autoreply

You can also run the submit script with command-line switches. The following is an example of the non-interactive version of the CS 360 submit script.

prompt> 360_submit -l 1 -s 30351 -q
Tarring up files...
Tarfile finished
Mailing tar file to ta1
This lab has been submitted wait for an autoreply

If you do not receive an auto-reply from your TA, contact the TA to ensure that the files have been successfully received. NOTE: The auto-reply message will be sent to your EECS email account unless you have your email forwarded to your preferred email account (e.g., user@utk.edu).

Reporting Problems


Information for Teaching Assistants

Initial Setup

The head teaching assistant for a given course must email a list of lab sections, TA usernames (for each section), and lab day/time to ithelp@eecs.utk.edu. Below is an example that shows the desired format for the information.

SECTION=001;TA=ta1;LAB=M 9:05
SECTION=002;TA=ta2;LAB=M 11:15;CC=ta3,ta4
SECTION=003;TA=ta3:ta4:ta5;LAB=T 3:35
SECTION=004;TA=ta6:ta7;LAB=W 8:00;CC=ta1,ta2

If only one TA is assigned to a particular lab section, for example user ta1 for section 001 and ta2 for section 002, he/she will receive files submitted by students in that particular section. If multiple TAs are assigned to a section, for example if section 003 has three TAs, one of the colon-separated TA user names will be chosen at random to receive the submitted files. This "load-balances" the submitted labs between the TAs.

In addition, you can send a CC or "carbon copy" to other TAs such as in section 002. Just provide a comma-separated list after the "CC=" option.

Section 004 gives an example where labs are "balanced" between two TAs and "carbon copied" to two other TAs. Note the colons used for the TA list and the commas used for the CC list.

The username cannot be a class account (e.g., cs360, cs102), as email cannot be checked on class accounts.

After the EECS IT staff has the lab section information, a class-specific submit script will be placed in /usr/local/bin. The script name will be in the form of classnumber_submit (e.g., 360_submit300_submit). For 494/594 classes the class number will also have two descriptive letters (e.g., 594np_submit for 594 Network Programming).

In the past, TAs were required to set up a procmail rule to create automatic replies to lab submissions. This has been replaced by a system-wide auto-reply from the labs@eecs.utk.edu email address.

Files Produced by the Submit Script

The submitted files will be sent as an attachment with a MIME-type of application/gnutar. Most of the email clients installed on EECS systems (Pine, Mutt, Web-mail through webmail.eecs.utk.edu, or a GUI email client such as Mozilla Thunderbird) should be able to open the attachment. If you are using mh or mail, you may experience problems opening the attachments.

The filename of the attachment contains the lab number, class number, student username, and a Unix timestamp – for example, lab1.360.jruser.1092847673.tgz. To convert the Unix timestamp to a human-readable date, use GNU date. The following is example output produced when converting the Unix timestamp 1092847673.

prompt> date --date="01/01/1970 UTC 1092847673 seconds"
Wed Aug 18 12:47:53 EDT 2004

Extracting Submitted Files

To extract submitted files, you must un-gzip and then un-tar the .tgz file. The following example shows how to extract the files from lab1.360.jruser.1092847673.tgz.

tar xfvz lab1.360.jruser.1092847673.tgz

The extracted files will be placed in a directory corresponding to the lab number, class number, and student username – for example, lab1_360_jruser. You should be aware of potential directory name conflicts caused by a student submitting files for the same lab number multiple times. If you choose not to delete the previous submissions, the last file un-tarred will be the most recent version submitted because of the Unix timestamp.

Reporting problems

 

Linux Manual Page for Submit

The following information can be obtained by using man submit or man classnumber_submit.

Name

submit - A general submit script for EECS

Synopsis

submit [ [-p] [-h] [ -l lab_number -s section_number -q ] ]

Description

This submit script is intended for use in the University of Tennessee Computer Science Department. The script should be run from the directory that contains the lab you want to submit. The submit will ask a few questions if run with no options.

Then the directory and all subdirectories will be tarred and gzipped and then mailed to the TA you selected. You can also run the script in non-interactive mode by entering -l lab_number -s section_number -q. When run in this manner the script does not give the user a chance to see what directory they are in, though it does check to make sure section_number exists. If the section number does not exist the script displays a list of good sections and exits without taking any action.

You can also just get a list of the sections by throwing the -p option.

Options

-l lab_number

Enter the lab number to submit on the command line.

–lab_number lab_number

Same as -l

-s section_number

Enter the section number to submit to on the command line.

–section section_number

Same as -s

-p

Print out a list of sections, TAs, and times without submitting a lab.

–print-list

Same as -p

-h

Print out a Usage message.

–help

Same as -h

-q

Quiet don't check directory before running.

 

Sample Run

Here is a sample run of the script in interactive mode.

prompt> 360_submit
You are about to submit a lab for 360
Make sure you are in the directory that contains the lab
you want to submit. Your current directory is:
/home/lab_user/cs360/lab1
Is this the correct directory? (y/n):y
Please enter the number of this lab:1
Please choose which section to submit your lab.
Choice Section Number TA Username Class Time
------ -------------- ----------- ----------
0 001 head-ta M 9:05
1 002 jruser M 11:15
Please choose the section of your lab: 1
Tarring up files...
Tarfile finished
Mailing tar file to jruser
This lab has been submitted wait for a autoreply

This could have been done in non-interactive mode like so:

prompt> 360_submit -l 1 -s 30364 -q
Tarring up files...
Tarfile finished
Mailing tar file to jruser
This lab has been submitted wait for a autoreply

See also


 

The University of Tennessee, Knoxville. Big Orange. Big Ideas.

Knoxville, Tennessee 37996 | 865-974-1000
The flagship campus of the University of Tennessee System