Checkin Program Instructions for Instructors
(And Professors, Teachers, and T/As)
Intro
The new checkin program is called checkin_prog. It is very
similar to the old checkin program except that it is designed for
added security and more logging. It is also meant to be easy to setup
and maintain.
The basic idea is that it will allow a student to turn a file in for
grading. The file will be coppied into a safe location where they
cannot touch it. Once it has been copied, it will be owned by the
class account, and with permissions set to 400 (-r--------) The
directory the configuration files (and files turned in by the
students) are stored in is set to 700 (drwx------) so that the
students have no access to any of it. Logs are kept of everything the
student does. So if a student says "I tried to turn it in but... "
You can check and see if they really did... Also the logs can be used
to monitor the usage of the checkin program to be sure that nobody is
trying to exploit it.
Installing
Installation is very simple:
- Log into any Linux Machine using the clas login,
for example cs101.
- If you do not already have one, create a bin directory in the
class account.
For example: ~cs101/bin.
- Copy the executable ~sa/checkin/bin/checkin_prog into the bin directory
of the class account.
For example, for cs101, it should be copied to
~cs101/bin/checkin_prog.
- run checkin_prog
This will make the program install itself, which includes:
- Checking the permissions of the bin directory, and
fixing any problems.
It will create the directory if it does not
already exist, and make the permissions 755 (drwxr-xr-x) if they are
not that way already.
- Checking the permissions of the executable checkin_prog
It will make them 4711 (drws--x--x) if they re not that way already
- Create (if they do not already exist) 3 symlinks which point to
checkin_prog, named "checkin", "peek", and "grade".
These are the commands that the students should be using.
- Checking the permissions of the Checkin directory in
the top level of the class account, and fixing any problems.
It will create the directory if it does not already exist, and
make the permissions 2700 (drwx--S---) if they are not that way
already.
The stickybit will make it so that any directories
or files which are created inside this directory will
automatically get their group set to "class".
- Check the permissions on two files named "users" and
"assignments" which live in the Checkin dir.
Both files will be created if they do not exist, and will
be set to 600 (-rw-------).
These files are used for Configuration (See the next section).
- Read the "assignments" file to make sure that it is
syntactically correct.
It should tell you how many errors occured, and how many it fixed.
If the two numbers are not the same, you should fix any problems that
it reported.
- run checkin_prog again until there are 0 errors.
If it does not say that there are 0 errors, then something is
wrong! At this point you will need to fix any errors it reports,
or contact Charlie Ross
rossc@cs.colostate.edu.
Configuring
Configuration is done using two files. "users" and "assignments"
Both files (when created) contain comments at the top which describe
how they work.
Here are the comments:
users
# Put usernames, one per line, in this file
# Usernames listed here will be alowed to
# Run the checkin/peek/etc.. programs
# So, this file should contain the usernames
# of people in the class!
#
# If for whatever reason, you want to allow
# EVERYONE to submit files, just put a line
# in this file with the word EVERYONE
# It must be on the line by itself, and be in
# all capitals.
assignments
# The file is line oriented. Everything after the character '#' is considered
# a comment and is ignored. Blank lines are ignored.
# Each line of this file should contain a name
# of an assignment and three dates/times
# the dates/times are optional. The name MUST be in upper case.
# The first date is the date a homework is assigned
# students will not be able to turn it in before this date.
# The second date is the due-date
# students will be given a warning telling them that the
# Assignment is late if they try to turn an assignment
# after this date, but they will be allowed to turn it in.
# and the assignment name will be prefixed with "LATE_"
# The final date is the drop-dead date
# students will NOT be allowed to turn it in after this date.
# Dates are of the form MM/DD/YYYY@hh:mm:ss
# hh is in the range 0 - 23 (Hours after midnight)
# mm and ss are in the range 0 - 59
# hh mm and ss are all optional, and will be 0 if omited
# which would be midnight (0:0:0)
# For example:
# HW3 8/8/2005@9:50 8/12/2005@9 8/13/2005
# Means that 'HW3' was assigned on Mon Aug 8, 2005 at 9:50 am
# (monday after class)
# and is due on Friday Aug 12 at 9am (at the beginning of class)
# but can be turned in at any point before Sat the 13th
# so, Friday night at 11:59:59 is the latest that it would be accepted.
#
# If you leave the dates off, then no date-checking will be done for
# that assignment. For example:
# HW0
# Means that there is an assignment which can be turned in at *any* time
#
# An entry of
#
# HW3 8/8/2005@9:50 8/12/2005@9 8/13/2005 # P3.java
#
# has the same schedule for submission as above. In addition,
# the file checked in *MUST* be named P3.java.
Example
When a student tries turn in an assignment, the file will be placed in
their own directory inside a directory named after the assignment they
are turning in, inside the Checkin directory. For example,
if a student in cs101, named smithb turns in a file named
my_homework for the assignment HW3, the file will be
stored as ~cs101/Checkin/HW3/smithb/my_homework
If they then turn in another copy, the old one will be renamed to
my_homework.old... if they then turn in another copy, the
oldest copy will become my_homework.old2 the second one will
be my_homework.old and the most recent copy will be
my_homework. No files are ever deleted... Only renamed If a
student turns in a late copy of the same file, it will be called
LATE_my_homework
Grading
If you want to use this program for grading, all you need to do is put
a file next to the student's directory with their grade in it with the
name of the file being their login ID with ".grade" on the end. For
example if you grade smithb's HW3, you would name the file
~cs101/Checkin/HW3/smithb.grade. You could make the
permissions 600 (-rw-------).
The first line of the file should contain the grade itself.
Any subsiquent lines are comments. For example:
8/10
You lost a point on question 3 where you said that
computers work by magic, and are powered by pixies.
-1
In question 6, where you said "Moore's law states
that when a computer is dropped, it will fall to earth" ..
I think you meant gravity.. not Moore's Law.
-1
The rest was right!
And the student will be able to get their grade and comments
using the grade program.
For Students: Checking In Assignments
Login to a Linux machine (if you aren't on one already). (Try davis)
"cd" to the subdirectory containing the file(s) to check in.
type ~cs101/bin/checkin HWx filenames
"HWx"
should be whichever homework you are submitting (such as HW3 or
HW1) "filenames" should be replaced with whatever filenames you
want so submit (You don't need to submit all of the files at the
same time if you don't want to. One at a time is fine as well,
they will only overwrite the older files if they Have the SAME
name.
The checkin program will tell you some messages. Hopefully, they
will say encouraging things like "Checkin successfull", and the
current date/time, and other useful information. It will also
tell you if it has made any backups of older files.
For Students: Making Sure Things Were Checked In Right
- Login to a Linux machine (if you aren't on one already). (Try davis)
- Decide how paranoid you want to be:
- Type ~cs101/bin/peek and you will be presented with a list
of every file you have ever submitted to the checkin program in this class.
As well as dates, times, sizes, and the assignment it was submitted for.
- Type ~cs101/bin/peek HWx (where HWx is the
assignment you are checking on) and you will be presented with a
list of every file you have ever submitted for that assignment.
- Type ~cs101/bin/peek HWx filename (where HWx is
the assignment you are checking on, and filename is the file you
want to look at) and it will dump the contents of the file to
your screen. If the file is long, you may want to consider
"piping it thru more" (meaning, type ~cs101/bin/peek HWx
filename | more. You could also redirect the output to
a file, if you wanted to compare it (using diff, perhaps) with a
file in your home dir.
- Once you feel secure enough that it worked, you can relax.
For Students: Checking Grades
- Login to a Linux machine (if you aren't on one already). (Try davis)
- Type ~cs101/bin/grade and you will be presented
with grades for each of your graded assignments.
- Type ~cs101/bin/grade HWx (where HWx is the
assignment you are checking on) and you will be presented with
with the grade and comments for that assignment.
For Students: Making it easier
You may not like typing in such long commands.
in that case, you can add an alias to your .cshrc
for example, yo umay want to add the lines
alias ci155 '~cs101/bin/checkin'
alias pk155 '~cs101/bin/peek'
to your .cshrc and the effect would be that you would only need to type:
ci155 HW2 myfile.txt instead of ~cs101/bin/checkin HW2 myfile.txt... and
pk155 instead of ~cs101/bin/peek.
For Students: An Example
Lets say you wanted to turn in a file Results.txt for HW2:
% cd cs101/Assign2
% ls
Results.txt SomeOtherFile.txt SomeThingElse.txt
% ~cs101/bin/checkin HW2 Results.txt
Checking in files for assignment 'HW2'
Current time is: Mon Aug 8 12:16:03 2005
Assignment is ON TIME!
If you wish, you may turn in another (presumably better)
version up until Fri Dec 9 23:59:59 2005
and it will replace this version.
File Results.txt was checked in.
%
Now, suppose you made a mistake and wish to fix it and submit a new copy..
% emacs Results.txt
% ~cs101/bin/checkin HW2 Results.txt
Checking in files for assignment 'HW2'
Current time is: Mon Aug 8 13:45:35 2005
Assignment is ON TIME!
If you wish, you may turn in another (presumably better)
version up until Fri Dec 9 23:59:59 2005
and it will replace this version.
Renaming old Results.txt to Results.txt.old
File Results.txt was checked in.
% ~cs101/bin/peek
Size Date Time Assignment File
---------- --------------- -------- ---------- ----
13703 Mon Aug 8 2005 13:45:35 HW2 Results.txt
13814 Mon Aug 8 2005 12:16:03 HW2 Results.txt.old
2 Files listed
%
For Students: Some things to keep in mind
- All assignments are to be submitted electronically and are
automatically time stamped, so we know when files were
submitted. PLEASE SUBMIT ASSIGNMENTS ON TIME!
- Logs are kept of everything, so if you try to submit files and it
does not work correctly, we can look at the logs to help identify the
problems.
- It is YOUR responsibility to ensure that you have
submitted all the files that are required for each assignment. All
files you submit should be named appropriately. If you fail to submit
a homework, we cannot grade it! And if we can't grade it.. we have to
assume a ZERO! So please be sure to submit things properly.
- You can run the checkin program on the same file as many times
as you like. The checkin program will keep every copy, but only
the MOST RECENT will be graded. If for some reason you want an older
version to be graded, please let us know!
- The checkin program only runs on Linux machines. Almost
all of the machines in the labs run linux. But if for some reason you
log in on a machine that runs another OS, you can log in to a linux
machine (like armstrong, basie, brubeck, davis, ellington, etc..) and
run the checkin program from there.
- The checkin program will let you check in any file at all,
wether it is a text file, or an executable, or a jpeg, or a video
game, or a... you get the idea... So please be careful what you
submit!
- The checkin program will NOT alter your copy of the file being
submitted. It will just send a duplicate of it for grading. Don't
wory about it harming your files. It will not.
- Every assignment has three dates associated with it:
- Assigned date: If you try to submit a file BEFORE it is
assigned, the checkin program will not let you.
- Due Date: The checkin program will remind you of the due
date of an assignment when you submit it. If you are before the due
date, it will let you know how much longer you have to re-sumbit a
newer version before the due date. If you are after the due date, it
will let you know that the assignment is late. Hopefully you will
still get some partial credit.
- Drop Dead Date: The date after which the homework will not
be accepted. The checkin program will simply not let you submit after
this date. After this date, there is no partial credit. Sorry!
For Instructors: Web Checkin
In the csXXX/bin directory are four programs: checkin_prog,
checkin, grade, peek. The latter three are links to the actual executable
checkin_prog. Students can execute checkin, grade, peek.
Only the owner can directly execute checkin_prog. To
facilitate web checkin, the program may be executed as
checkin_prog userName checkin assignName fileName
This does a checkin on behalf of userName. Everything after the
userName is the same syntax as the actual checkin, grade, peek
operation. Since the web PHP scripts execute as the owner of the account, this
change was necessary to be able to perform operations via a web page.