Turnin - A Program for submitting class materials
turnin is a program installed on the UNM instructional machines (e.g. moons.cs.unm.edu) for submitting class materials for grading. It provides a simple interface, but requires careful use of permissions to turn in assignments.
Basic Usage
To turn in assignments with turnin, a user must have all the files he seeks to turn in, as well as the name of the assignment as set up by the instructor. This name is typically of the form “classname.assignname”, for example cs151.assign1. To turn file a.c, b.c, and Makefile for the assignment cs151.assign1, a user simply runs:
turnin cs151.assign1 a.c b.c Makefile
This command will then copy each of the selected files to a user-specific directory for turning in those files. You may see a list of turned-in files by using the -ls option to turnin, for example by running:
turnin -ls cs151.
Similarly, you may delete turned-in files by supplying the -rm option to turnin, for example:
turnin -rm cs151 a.c
File Permission Caveats
Because turnin runs as a setuid program to be able to copy files to a priviledged turnin directory, you must be a little careful with the permissions of the files you are turning in and the directory that contains them. In particular:
- The directory that you run turnin from must have world execute permission so that hte turnin program can search for programs in it
- The files in that directory must be world readable
Of course, you don't generally want to keep all of your files world readable to prevent others from reading/stealing them. So, to do this, I recommend you do the following steps:
1. Make a subdirectory under the directory containing the files you want to turn in, and make *that* directory world searchable 2. Copy all of the files you want to turn in to that directory and verify that all of the files you need to turn in are in that directory 3. Make all of the copied files in that subdirectory world readable 4. Turnin those files 5. Make that directory and its contents no longer world readable/searchable.
Example of usage
As an example, that would mean doing something like this:
bridges@phoebe> ls a.c b.c Makefile bridges@phoebe> mkdir submitted bridges@phoebe> chmod a+X Makefile bridges@phoebe> cp a.c b.c Makefile submitted bridges@phoebe> chmod a+r submitted/* bridges@phoebe> cd submitted bridges@phoebe> turnin cs151.assign1.jacobi a.c b.c Makefile Turning in: a.c -- ok b.c -- ok Makefile -- ok All done. bridges@phoebe> turnin -ls cs151.assign1 .: total 0 -rw-rw---- 1 bridges ssg 0 Oct 21 2009 Makefile -rw-rw---- 1 bridges ssg 0 Oct 21 2009 a.c -rw-rw---- 1 bridges ssg 0 Oct 21 2009 b.c bridges@phoebe> cd .. bridges@phoebe> chmod go-rX submitted