Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Requesting a class definition

In order to get started using the project submission system, you must first request that your class and username be added to the system-wide submit.class file. This is accomplished by placing an RT ticket.  Please include your UCE/GL username, as well as your class and section number. (for classes with multiple sections/instructors, it may be necessary to include the section number in the class definition, so that uniqueness of a class name is guaranteed). submit.class entries last for one semester, so it is necessary to request a new entry at the beginning of each semester.

What Submit Does

Submit is a perl script that is basically an AFS Access Control List and directory tree manager. It requires no special operating system privs to run, and as such, will only give away as much access to your account as you allow it. If you are more interested in what/how it does what it does, please feel free to view the script (all the functions of the program are contained in a single script), or assign it to your students as an exercise to improve (smile)

Additional Reading (OpenAFS Documentation)

Setting Up Your Account

The behavior of the system is controlled by a file called .submitrc located in your home directory. The file is structured into multiple CLASS groups, each of which can contain specific information for each class the account is set up to receive submissions for, and one or more PROJECT groups, which contain information specific to each project. Do NOT use an editor that uses CR/LF line terminators (like Microsoft's Notepad) or CR only (like Apple's Macintosh) – stick with any of the Unix editors.

Configuration directives

  • CLASS <classname> - Deliniates the beginning of a new CLASS group.
  • DIRECTORY <dirname> (optional) - Specifies the top-level directory that all files for this class will be placed. If the path specified is relative (meaning, doesn't start with a /), the directory will be based in your pub directory. Many instructors like to set this value to be the same as their classname. Use of fully qualified paths are supported, but not recommended, as their use requrires further knowledge of AFS, which is beyond the scope of this document. It is optional, as the default submission directory for a class is your account's pubdirectory. However, this will most likely be undesireable, because:
    • It will make your pub directory non-public...
      ...and
    • If you have more than one class things could get messy
  • STUDENTS <student> [ <student> ... ] (not really optional) - STUDENT lines define the list of students that are authorized to submit projects in a class. Multiple STUDENT lines may accompany each class. Specifying a student's account name that does not exist on the system may cause submitinit to fail.
    The accounts in this list are also made members of the AFS <username>:submit_<classname> group, which can be used in AFS ACL's to restrict access to files that you only wish to be viewable by members of a class. (for more information on AFS ACL's, please see the AFS documentation.
  • GROUP <groupname>(optional) - This defines an AFS protection group that will be assigned to have read/write access on all of the student's submittal directories. This can be used to give a grader (or group of graders) access to a class's submitted files. For more information on defining AFS protection groups, please see the AFS documentation.

    Note
    titleUse a valid AFS group

    Specifying an AFS group name here that is not in a valid format will cause submitinit to fail with the error:

    Code Block
    languagetext
    themeRDark
    titleuser@localhost
    fs: Invalid argument, possible reasons include:

    Also note this AFS group must already exist before you run submitinit, otherwise it will fail with the error mentioned above.


  • PROJECT <projname> - This begins a new project, of the name 'projname'
  • DESCRIPTION <descriptiong> (optional) - Allows a one-line description of the project to be attached to the project's name (for use in 'submitproj').
  • ENDDATE <date> (optional) - Defines a date whereafter any run of submitinit will place all the submital directories for this project into a read-only (for the students) state. The date should be specified MM/DD/YYYY. (two digit years will be accepted, however, their behaviour after 2000 is undefined (smile) )

    Warning
    titleUse a four digit year format

    Make sure your ENDDATE is in the format MM/DD/YYYY (4 digit year). If you only provide 2 digits, it will assume you mean 1916 instead of 2016, which is probably not what you want!


A Sample Submitrc

Code Block
languagetext
title.submitrc
linenumberstrue
CLASS cs201
DIRECTORY cs201fall98
STUDENTS bill joe bob bbob1 jspud1 lluser2
STUDENTS ffreed3
GROUP banz:cs201graders
PROJECT proj1
DESCRIPTION An Easy Project
ENDDATE 08/28/1998
PROJECT proj2
DESCRIPTION A harder project
ENDDATE 09/21/1998

Running submitinit

Upon first setting up your .submitrc, and after any edits thereafter, it is necessary to run submitinit for the changes to take effect. If submitinit fails, it is usually because a student account name was incorrect, or, an invalid group was specified in the GROUP directive. After you've checked for these errors, please Request Help and enter a ticket describing your problem, and we will try to rectify it.

Warning
titleCheck your file encoding

Your .submitrc should be a plain ASCII or UTF8 file. If you're downloading your .submitrc file from Blackboard, it may be including a byte-order mark (BOM), which will confuse submitinit and cause unintended problems. You can confirm the encoding using the file command:

Code Block
languagetext
themeRDark
titleuser@gl.umbc.edu
$ file .submitrc
.submitrc: UTF-8 Unicode (with BOM) text

This StackExchange submission lists several ways to remove the BOM (I recommend the VIM method): https://unix.stackexchange.com/questions/381230/how-can-i-remove-the-bom-from-a-utf-8-file