Jeffrey M. Vinocur
Cornell University
jmv16@cornell.edu
This document is being written to clarify the features of the software on submit.cs.cornell.edu, and as such may change frequently as functionality is improved. It is intended for professors and teaching assistants with a reasonable degree of Unix experience.
This document was typeset in LATEX and additionally processed by LATEX2HTML. It is available on the web in HTML, DVI, PostScript, and Adobe Acrobat.
At present, we are able to provide the following. Most functionality (writing web pages, setting up problem set submissions, retrieving problem set submissions, updating grade database) is accessible from a unix shell and also via scp (secure file copy), SafeTP, Windows (Samba) Filesharing, and Appleshare, however unix knowledge is necessary for, at minimum, generating usernames and passwords for students, and using the SML test harness if desired.
If you are interested in the system, contact Jeff Vinocur (jmv16@cornell.edu) for a demonstration or to get started. In a technical emergency, you may also wish to contact Nathan Lutchansky (lutchann@litech.org). We are students, with coursework, deadlines and exams of our own, so please be considerate.
We provide webspace at http://submit.cs.cornell.edu/csXXX/ (where XXX is the course number). We will gladly make that same directory tree available at http://csXXX.cs.cornell.edu/ -- to accomplish this, you must request from ADM that a CNAME DNS record for that host be made (pointing to submit.cs.cornell.edu).
(All file references are based in /usr/local/submit-apache/.)
Students will require web accounts on the system (we hope to use CIT's Kerberos-based authentication in the future; work is in progress). These are their NetIDs with a password that will be randomly generated and emailed to them.
This information is kept in a standard apache/unix-style text file (csXXX.passwd), each colon-delimited line containing NetID, encrypted password, and full name string. A sample passwd file appears at the end of this document.
Students may be easily added to the password database using the utils/makeuser.pl script, which is fully documented in the README-makeuser file in the same location. Essentially, it reads a list of NetIDs (one per line) from standard input, adds each to the database with a random password (querying the Cornell Directory Server for fullname strings), and sends each an email with password and instructions.
Passwords may be reset by simply attempting to add the NetId again using the procedure above. Individual passwords may be manually set using the /usr/local/apache/bin/htpasswd utility, but this is not recommended because it deletes the fullname field which must be replaced manually or the database will be considered corrupt.
The person or people in charge of administering a course's online submission have unix accounts on submit.cs.cornell.edu. Telnet access will not work except with S/Key one-time passwords1, but SSH is supported.
In addition, many (but not all) of the administrative tasks can be performed using filesharing. We support Windows2 and Macintosh3 filesharing. Please note that Appleshare access requires DHX password encryption (included by default since Appleshare Client 3.8.6; available as a plugin with 3.8.3).
Access to files from the unix shell is determined using Access Control Lists (an implementation of POSIX 1003.1e Draft Standard 17). This allows us to assign full and read-only access as desired, although our standard configuration will suffice for most purposes.
Members of the course staff can also be given web accounts (like those for students). Certainly at least the person in charge of administering submission will want one to be able to test configuration changes.
It is not necessary to maintain information about such users in the grades.csv file (unless desired for testing) as the grades.pl script gracefully handles missing users.
Users listed in the csXXX.group file have access to the administrative features of the web interface. At the moment, these consist of being able to check what partners students have chosen. A sample group file appears at the end of this document.
All problem set submission files are in the /usr/local/submit-apache/psets-csXXX/ directory. They are as follows:
As the students submit, directories psX/netid/ are created, each containing the uploaded files (with names as indicated in the configuration file). However, if partners are being used, each psX/netid/ directory contains only a file partner which lists the NetID of the selected partner. If both students have selected each other, either/both may upload files, which will be stored instead in a psX/netid1-netid2/ directory.
Once files have been uploaded, with or without a partner, students may not change their partnering status. Course staff may allow such a change by removing the submitted files (or, at minimum, the timestamp file, located in the same place as the uploaded files, which is updated on any submission).
When an existing file is overwritten, the old version is renamed with a period and version number (filename is the current version, filename.0 is the oldest, then filename.1, then filename.2, ...).
If a student attempts to submit after the deadline, he will be asked if he would like to reenable submission (it is clear that this is no guarantee that late assignments will be graded -- but we have found this mechanism preferable to receiving files via email in the event an extension is granted). If he chooses to, an empty file late-submissions will be created in the directory with his uploaded files.
Then, if only a brief time has passed since the deadline (the length is set in the configuration file and can be zero if desired), uploaded files are treated as described above. However, if the grace period has ended, all uploaded files are put in a late/ subdirectory. Thus one can be assured that after the grace period, none of the files in the normal location will be modified; additionally, files in late/ may be ignored unless the student emails with an acceptable excuse.
We have, due to Matthew Harris, a system for automatic testing of students' code. It is in utils/testharness/; there is some documentation in that directory.
The testharness.pl Perl script takes the path to a configuration file (example at the end of this document) and a list of directories to process. (This is just the last component of the directory, e.g., netid, or netid1-netid2 if partners.)
You may find it useful to take a list of such directories (generated, for example, by ls -d * or ls -d *-* if partners) and pipe it into xargs to treat the names on standard input as arguments to the Perl script. (Note that if your ls produces pretty output, e.g. with slashes at the ends of directories, you should probably precede it with a backslash.)
There are a variety of interesting things in /usr/local/submit-apache/, documented briefly here:
The first line must contain headers describing the fields (including the first field, NetID). Whitespace after the commas is optional.
NetID, | PS1, | PS2, | Prelim 1 |
jmv16, | 100, | 97, | 99 |
nl43, | 98, | 99, | 96 |
This file should be generated automatically by the utils/makeuser.pl script; format is provided here as a reference. (The encrypted passwords below are not real.)
jmv16:ViMTrvy6U89j:Jeffrey M. Vinocur msh23:6hBfmO/U5gJ9:Matthew Scott Harris nl43:kVTi4Um3bVb:Nathan Lutchansky
This simple file lists a subset of those users in the csXXX.passwd file to whom web-based administrative features are accessible.
staff: jmv16 msh23
# Config file for problem set submission # Most strings can have small amounts of HTML in them # This file would be named "ps2.conf" and the submitted files # would go in the "ps2/" directory # name of the problem set name=PS2 - Introduction to SML # time to close submission, in unix time # # generate this from the commandline with: # perl -MTime::ParseDate -e 'print parsedate("9/12/00 4pm"),"\n"' close=981482400 # grace period to accept late submissions without penalty, in secs # (anything from 0 to 600 is reasonable) grace=30 # small blurb, probably with the due date info=Due Tuesday, February 6 at 1:00pm # whether assignment is to be done with a partner # yes - requires a partner (see next setting) # no - forbids submitting with partner # anything else, such as 'optional', will allow but not require partners partners=no # If partners are required, the odd-numbered person (or anyone you # choose to allow to submit alone) may use the special keyword set below # in the place where partner's NetID is usually typed. If partners are # optional, this keyword is presented to the students when they are # asked to choose partners. # # keyword to use for users without partners nopartner=Vacuum # files to submit, in the order they should be listed # format is: # <filename>=<max_size_in_bytes>/<max_chars_per_line>;<filetype>;<description> # # Recognized filetypes are: # sml SML source code (begins with '(*') # java Java source code (begins with '//' or '/*') # matlab Matlab source code (begins with '% ' or 'fu' (for 'function')) # text Freeform text Files # important keyword :-) test=100000/0;text;Use this if you want to <strong>test</strong> uploading emacs.txt=100000/80;text;<code>emacs.txt</code> - Part I misc.sml=100000/80;sml;<code>misc.sml</code> - Part II narytree.sml=100000/80;sml;<code>narytree.sml</code> - Part III funcstar.sml=100000/80;sml;<code>funcstar.sml</code> - Part IV End # another important keyword
This configuration file is really a snippet of Perl. Note the commas after some lines.
{ # a string name => 'Problem Set 2', # Any files in the scaffolding directory will be copied in with the # students' code before testing. These should be any files they did # not need to submit, such as signatures, and also any files needed # for testing. A sources.cm file should be included. scaffolding => '/usr/local/submit-apache/testing-cs312/ps2/ps2test', # The `expect` utility is used to simulate an interactive session # with the SML compiler. These numbers, in seconds, indicate how # long to wait before aborting. compiletimeout => 10, runtimeout => 60, # This is the base path to which each of the commandline arguments # will be appended (with a slash added). studentcode => '/usr/local/submit-apache/psets-cs312/ps2', # This is where to put the generated PostScript output. outputlocation => '/usr/local/submit-apache/testing-cs312/results/ps2out', # Each of the following parts will be prettyprinted in a separate # file for each student (in the outputlocation specified above). Each # of those files has the 'name' at the top with the NetID(s), then # the code specified in 'file' printed with line numbers, the compiler # output, noting Warnings, and finally the results of any test cases # indicated. # # If a 'testfunc' is an empty string, no compilation is attempted. # If a 'testfunc' is '()' (the ML unit), compilation will be # attempted but no test cases will be run. units => [ part1 => { name => 'Getting to Know Emacs', file => 'emacs.txt', testfunc => "" }, part2 => { name => 'Miscellaneous Functions', file => 'misc.sml', testfunc => "MiscTest.test()" }, part3 => { name => 'Nary Trees', file => 'narytree.sml', testfunc => "NarytreeTest.test()" }, part4 => { name => 'Curried Functions', file => 'funcstar.sml', testfunc => "FuncstarTest.test()" }, ] }
This document was generated using the LaTeX2HTML translator Version 99.2beta8 (1.43)
Copyright © 1993, 1994, 1995, 1996,
Nikos Drakos,
Computer Based Learning Unit, University of Leeds.
Copyright © 1997, 1998, 1999,
Ross Moore,
Mathematics Department, Macquarie University, Sydney.
The command line arguments were:
latex2html -no_navigation -dir html -mkdir -noaddress -local_icons -show_section_numbers -split 0 -white -transparent submit.tex
The translation was initiated by Jeffrey M. Vinocur on 2001-03-03