Submit assignments

From BMC Computer Science Systems
Jump to: navigation, search

Some classes require submission of assignments from the shell using the submit script. Once an instructor has populated a submission directory, any student with a CS account can submit assignments to it.

PATH

The submit script is located at /usr/local/bin/submit. If /usr/local/bin is not in your PATH, you will need to add it, or run submit with the absolute path. To add /usr/local/bin to your PATH temporarily in bash (the default shell), run

$ export PATH=$PATH:/usr/local/bin

To see the current PATH, run

$ echo $PATH

To set this permanently, open ~/.profile and add :/usr/local/bin to the end of the line beginning in PATH=.

For instructors - populate submission directories

Before students can submit projects, you will need to create the submission directory and set the permissions properly. The submit script can do this automatically for you.

$ submit -i -c $COURSE -p $PROJECTS

Here, $COURSE is the course number and $PROJECTS is the number of projects that will be assigned during the semester. For a class named CMSC246 with five projects, the initialization process will look like this.

$ submit -i -c 246 -p 5

CS Submission System Spring 2014
Initializing instructor directories for CMSC246

Checking directory structure and permissions...
/home/taro/submissions/spring2014/cmsc246/project5 created
/home/taro/submissions/spring2014/cmsc246/project4 created
/home/taro/submissions/spring2014/cmsc246/project3 created
/home/taro/submissions/spring2014/cmsc246/project2 created
/home/taro/submissions/spring2014/cmsc246/project1 created
/home/taro/submissions/spring2014/cmsc246/project1 set to 1733
/home/taro/submissions/spring2014/cmsc246/project2 set to 1733
/home/taro/submissions/spring2014/cmsc246/project3 set to 1733
/home/taro/submissions/spring2014/cmsc246/project4 set to 1733
/home/taro/submissions/spring2014/cmsc246/project5 set to 1733

Initialization complete!
You are now ready to accept project submissions from students.

$

As shown above, the script output will indicate where the submissions for each project can be found.

For students - submit an assignment

The submit script assumes that the work you wish to turn in exists in a directory, which it takes as an argument. The syntax for submission is

$ submit -c $COURSE -p $PROJECT -d $DIRECTORY

where $COURSE is the course number, $PROJECT is the number of project to submit, and $DIRECTORY is the name of the directory containing your work. A sample submission for Project 1 in a class named CMSC401 with the project files in "proj1" would look like this.

$ submit -c 401 -p 1 -d proj1

CS Submission System Spring 2014
Submitting Project 1 for CMSC401 with taro

Creating archive for submission...
a proj1/ 0K
a proj1/hoge 0K

Submitting archive...
Submission complete! Submission timestamp is 2014-01-29-14-33-54-EST.

$ 

Submission archive name and timestamp format

The project directory will be archived as a .tar.gz file containing your username, the project number, and the timestamp of the submission, and copied to the instructor's submission directory.

The timestamp format is year-month-day-hour-minute-seconds-timezone. Hyphens are used as time separators for compatibility with platforms like Mac OS X that do not allow colons in filenames.