Submit script

From Tux
Jump to: navigation, search
Report problems here from inside UNLV's network
e-mail from your Rebelmail account

The submit script is a program used on UNLV CS servers for students to submit assignments to instructors. It is more common to use it in required introductory CS courses such as CS 135, although instructors may opt to use alternate submission methods such as email, WebCampus, or Moodle. Be sure to follow the assignment submission policies as provided by your instructor in class and on the syllabus.

submit script details

Instructions for use

  • SSH to and log in
    • You cannot submit your programs directly from lab computers in TBE B-361, you must SSH into bobby first
    • If bobby is not available, try or
  • Navigate to the directory your file is located in
  • Make sure your program compiles, is documented, and is tested
  • Type the following: submit filename XX instructor
    • filename is the name of your file (e.g. asst1.cpp)
    • XX is the assignment code and can range from 01 to 30, inclusive (note: the leading 0 is important -- 04 is correct, 4 is not correct)
    • instructor is the login name of your instructor -- you can see a current list of instructors and usage tips by typing submit without any other text
  • Check below for examples of correct and incorrect submissions as well as output from the script, but note that your file is received by the instructor only when you receive the message file Successfully Submitted!
  • The file that you submitted is not removed from your account

Notes about submitting

  • You should only submit .cpp or .tar files
    • The script will only successfully submit text files (e.g. submitting a.out would not be allowed) or binary files with .tar extension
    • For more information see the page on tar files, but note that these would only typically be used when multiple files are required for an assignment
  • Your file is time stamped and the instructor will download all student submitted files at once by specifying the assignment number and the last time stamp to accept
    • If your submission is due by 11:59 PM, you submit it at 12:03 AM, and your instructor downloads all submissions that are no later than 11:59 PM then your instructor will not get your submission
    • If your submission is for assignment 05 but you submit it with assignment code 06 then your instructor will not get your submission
  • You may submit as many times as you like although typically only the last submission prior to the deadline is downloaded by the instructor
  • The name of the file you submit does not matter -- when an instructor downloads your submission the file is renamed, although if you are submitting a .tar file the paths and filenames within are not modified

If you are curious and wish to view the submit script, it is located on bobby at /usr/bin/submit

Example submissions

Correct .cpp submission

[username@bobby directory]$ submit file.cpp 01 instructor
dos2unix: converting file /opt/submit/tmp_instructor/username.01.20180112160154 to Unix format ...
file.cpp Successfully Submitted!

Note the presence of a filename, a valid assignment code (01, not 1), and the instructor's name. You would replace file.cpp, 01, and instructor as appropriate.

The dos2unix message is in reference to a program that is run to correct differences in character sets between Windows and Linux. The message Successfully Submitted indicates that the program was submitted successfully.

Correct .tar submission

[username@bobby directory]$ submit file.tar 01 instructor
dos2unix: Binary symbol found at line 1
dos2unix: Skipping binary file /opt/submit/tmp_instructor/username.01.20180112161209
file.tar Successfully Submitted!

The message indicating skipping the file refers to the fact that there is no reason for dos2unix to correct character set differences in a binary file. The message Successfully Submitted indicates that the program was submitted successfully.

Invalid filename

[username@bobby directory]$ submit fakefile.cpp 01 instructor
File Not Found!, Submit Failed!
        Please specify a valid filename in the current directory
        and submit again.

Invalid assignment code

[username@bobby directory]$ submit file.tar 1 instructor
Invalid Assignment Number Format, Submit Failed!
Assignment Number must be one of 01,02,...,29,30

Invalid (or missing) information

[username@bobby directory]$ submit file.cpp instructor
You must specify your program name, assignment number and course instructor login name.
Assignment Number must be one of
Current instructors are:
You must run the submit program in the directory with your program file.
Example: submit programname.cpp 04 lee

You would also receive similar output with the following erroneous submission commands:

  • submit 01 instructor (missing filename)
  • submit file.cpp 01 (missing instructor)

Invalid .tar.gz submission

[username@bobby directory]$ submit file.tar.gz 01 instructor
File is not ASCII Text, Submit Failed!
        Please specify a text file.
        and submit again.

.tar files are the only binary files that the submit script will accept.

Instructor notes

Use getsubmit to see usage details on how to download student submissions and filter by assignment number and time stamp. Even after using getsubmit, all student submissions remain in ~/submit until you manually move or remove them.

When downloaded using getsubmit only the last submitted file prior to the time stamp you specify will be downloaded. All files, including .tar files, will download to the current directory as username.cpp.