Submit v2.0

Description

    Submit 2.0 is composed of two different programs that allow for students to remotely submit their computer science files for grading.  First, there is the command line version, which works much like the previous version of submit, except now java is required for user authentication.  We also now have an Eclipse plug-in that allows students to submit their files using a graphical interface right from within Eclipse.  Authentication is required, but now students will no longer have the need to ftp their files over to their acpub account in order to submit.  This convenience will help the push to encourage students to run Eclipse from their own machines when working outside of class/lab.

Command Line Usage

    The full usage of the command line version of submit is:

           prompt>submit [--server <host:port>] [--history] <course> <project> <file1> ... <filen>

The server and history optional flags will not need to be used very often.  The following example shows a student submitting all the .java files and README to the project named foo in cps108:

        prompt>submit cps108 foo *.java README

As you can see the only difference from the old version is that now the course is a parameter and not part of the program name.  Like before, students can only submit files/folders in the directory from which the program is run.  If a folder is specified, then all of the files/folders inside it will be submitted.  All server responses (success and failures) are written via standard output for viewing.  After successful submissions, a list of all the files that were submitted will be output to the screen for confirmation.

The optional flag --server <host:port>  specifies the location and port of the redirect server.  This should never need to be used as the program has the correct default, however if the redirect server goes down for some reason and must be run from a new machine or port, students can still submit by using this flag.  The parameter <host:port> should be specified either with the machine name or the IP address, followed by a colon and then the port number: e.g., --server submit.cs.duke.edu:3000   OR  --server 152.16.12.145:1234     Should this occasion ever arise, it would be more convenient to students to simply recompile submit with the new values.

The optional flag --history will return to the user a "history" of the last submission for the given course and project, i.e. date/time of last submission and list of files.  When using this flag the list of files is obviously not necessary.

If the program is run without any parameters, the user will prompted for the correct information, note though that the * wildcard does NOT work when submitting this way.

Once the program is started (or the correct information was entered when prompted), a java window will pop up requesting the user ID and password.  The id will default to the name of the user currently logged in.  The ID and password correspond to the user's acpub/NetID account.  When the information is entered, the user can hit the enter key or click on the "Login" button.  Passwords are never stored and only the hash of the password is sent to a kerberos authenticator, there is NO opportunity for password theft.  If the login was successful, the files will be submitted and the user will see the history of the submission.  If the login fails the program must be run again.

Eclipse Usage

    New for summer/fall 2003 is the ability to quickly and securely submit you files from within the Eclipse development platform.  The interface is completely graphical and very easy to use.  From within eclipse, choose the Submit... menu item from the DukeTools menu on the toolbar at the top of the screen.  The following is a screenshot from the Win32 version of Eclipse.

 

This will bring up the main submit window:

Steps for Submission

1) At the top is a list of drop down menus.  First select the course that you're in, this will fill the project drop box with a list of available projects to submit to.  Choose the appropriate project.

2)The text field defaults to the current working directory.  If you know exactly where your files are, you can type it in here (as you add or delete folders the view below will update).  To quickly go up a directory, you can click on the icon with the up arrow.  To open up a browse dialog click the "Browse..." button to choose the directory where your files are located.  To move into a folder that is displayed in the main right-side window, simply double-click it.

3) Once you are in the correct directory, click on the boxes next to the file names to select them.  Selecting a folder automatically checks all of its contents.  You can expand and collapse folders by clicking on the +/- next to it.  The complete list of currently checked files to be submitted will dynamically appear on the right side.  Below the main windows are checkboxes to filter out unwanted files.  If you only need .cpp and .h files, then check those boxes to remove the other files from the view.  Note that README and Makefiles will still always be displayed.

IMPORTANT: The way that the files appear on the right side maintains EXACTLY the same directory structure for submitting.  If your professor explicitly told you to submit without the folders, make sure the root is set correctly.  For examply, if project/foo/foo.cpp is displayed on the right side, then you will submit a folder named projet that has a folder named foo with a file named foo.cpp.  (For advanced java users, in this way you can submit java packages with the correct directory structure.)

4) Once your file list is finalized, click the Submit button at the bottom of the window.  This will bring up a small login dialog.  You MUST enter your ACPUB loginID and password for authentication.  Hit enter or click the submit button and all your files will be submitted.  Your password is never stored or written to any file and the communication is over a secure SSL connection (e.g. like myDuke.com).

5) Upon confirmation of your submission, one last dialog will appear.  It will tell you the date and time of the submission, how many times you have submitted, and a list of all the files and folders that were submitted. 

 

Eclipse Troubleshooting

    At some point the submit server may go down and you won't be able to submit your files.  You will know this because there will be no list of courses from the drop down menu.  (Also an error message will be output to the console.  If it happens that the server changes, or that your professor notifies you that there is a new server, there is a quick and easy way to set the new values from within eclipse. 

From the main menu bar choose Window, then Preferences at the bottom.  In the Preferences window click the Submit option on the left side.  Your window should look something like this:

All you have to do is enter in the new server address and port number that your professor gives you.  Click apply if you want, and then click OK  Now that the new values are set, assuming the server is up you should be able to submit your files just as before.

 

 

Questions

Questions regarding the programs should be directed to wjp@cs.duke.edu.
Owen L. Astrachan
Last modified: Tue Jun 24 16:00 EDT 2003