You are here

Practical Submission System

Printer-friendly versionPrinter-friendly version
This page is intended as an overview for teaching and computing staff.
Students: If you're looking for information on using the submit command please see the Submit page.
Computing Staff: see also the Submit Service Guide.

Introduction

The electronic practical submission system currently most widely used in the School is submit. Students use the submit command to submit their work for a practical. This command is fully documented on the manpage (do man submit on a DICE machine) and is not covered here -- this guide is for those users that need to access the submitted work.

Submit Group

Anyone who needs to access submitted work must be a member of the submit UNIX group. Most academic staff will already be a member of this group, but often PhDs who are assigned demonstrating or marking duties for a course are not. In order to be added to this group please contact computing support. Note that taught students providing teaching support such as marking cannot be given direct access.

Course Data

The submit system manages practical submissions based on data managed directly in Theon (the School Database) and data pulled down into Theon from the EUCLID APT (Assessment and Progression Tool). This includes such things as the course and individual exercises for the course. It can also include tutorial groups (often submissions are grouped into directories based on tutorial group so it is easier for individual tutors to pick up the exercises they need to mark). Before you can use the submit system for your course you need to make sure the ITO has all the necessary data and it is up-to-date; to do this contact the ITO.

One exception to this is the acceptable file names for submitted work. This ensures that when a submission is made only files that match certain names can be submitted. This again makes it easier for exercises to be picked up and collated for marking. You don't need to assign specific names but if you do you should use the command set_submit_file_names which is fully documented in the corresponding man page (man set_submit_file_names on a DICE machine). To use this command you must be a member of the cvs_submit UNIX group. In order to be added to this group contact computing support.

Structure

All submitted work is held in the /home/submit/submissions directory. The sub-directories within this are structured as follows:

COURSE/GROUP/UUN/EXERCISE

where COURSE is the course acronym such as "inf1-cl" or "iar", GROUP is the tutorial group name (or "default" if no tutorial groups have been defined by the ITO for the course), UUN is the username of the user making the submission (in the case of students sMATRIC) and EXERCISE is the short exercise code for the piece of work for a course. Within the EXERCISE will be the submitted files (or directories) for the student.

Handling Complex / Large Numbers of Submissions

To collect the submissions for marking you can simply use normal UNIX commands to copy or print the work from the appropriate course directories as described above. To make this easier we provide a command called process_submissions which is fully documented (man process_submissions on a DICE machine). This allows you to carry out an arbitrary operation on all submitted files matching certain criteria (such as from a particular tutor group or user or matching a given filename). By default process_submissions prints (lpr) all the submitted exercises meeting the criteria, but you can specify any UNIX command string. Some examples of using this command are given below.

Examples: Handling Submitted Source Code

  • process_submissions --comline \
    "enscript --header='%u' -G -p %u %f" --file work.c fai 1"


    This extracts all the submissions for exercise 1 of the fai course and saves them as .ps files in the current directory. The generated output includes a header with the name of the file and the username of the student (matriculation number).

  • process_submissions --comline \
    "enscript --header='%u' -G -P at7 %f" --file work.c fai 1"

    This does the same but prints them all out on at7 instead.

  • process_submissions --comline \
    "cat %f > %u" --file work.c fai 1"

    This extracts all the submissions and saves them as normal text files in the current directory. Each file is named according to the username of the student that submitted it.

  • process_submissions --comline \
    "echo %u" --file work.c fai 1 | wc -l"

    This tells you the total number of submissions.

Examples: Handling Large numbers of PDFs

With only a little more effort fairly complex processing can be performed on large numbers of files:

  • process_submissions --filename 'submission.pdf' --comline \
    'echo -e "%m - %t - %e \n %u (filename %F)" lpr; \
    pdftops -r 600 -paper A4 -expand -nocrop -duplex "%f" | lpr -o fit-to-page'

    This processes all matching PDF submissions, adding a textual cover page before reformatting the PDF to fit on A4 paper (in case of odd-sized submissions). Files will be printed in tutor group order by default.

  • process_submissions --comline \
    'mkdir -p "./%t"; cp -u --preserve=timestamps "%f" "./%t/%e-%u.%F"'
    This copies all matching PDF submissions into per-tutor-group directories, renaming them to standard, unique filenames. This can be useful where teaching staff must make copies of submissions for specific tutorials if markers do not have access to the submit file system.

Examples: Handling Deadlines

  • touch -d 'Friday 17:00' deadline.file
    process_submissions --filename cw1.c comline \
    'if [[ "%f" -nt ./deadline.file ]]; then echo "%e, %u, late"; else echo "%e, %u, on time"; fi'

    Because all files have timestamps set on submission, this demonstrates a way of checking for late submissions.

Checking Submission Times and Attempts

To check the times submissions have been made (for example to look for submissions made after the deadline) and to check what submissions were made before and after the deadline you can look at the /home/submit/submit-log file. To make this easier we provide a command called showmesubs, which can be used like in the example below.

  • showmesubs
    Collating Data from Log ...

    Scanning for courses ...
    The following courses have valid submissions associated:
    cp cs dmmr epl exc hci iaml inf1-fp inf2a test1 unknown

    Please choose a course from above:
    dmmr

    Scanning for exercises ...
    The course dmmr has the following exercises with valid submissions
    associated:
    cw1 cw2 cw3

    Please choose an exercise from above:
    cw1

    The following submissions for exercise cw1 of course dmmr have been
    made:
    User s0123456 submitted on Sep 27 2017 at 14:38:33 as attempt 1
    User s1234567 submitted on Sep 26 2017 at 14:22:50 as attempt 1
    User s2345678 submitted on Oct 2 2017 at 14:40:36 as attempt 1
    User s3456789 submitted on Sep 27 2017 at 15:00:14 as attempt 1
    User s4567890 submitted on Sep 26 2017 at 20:49:29 as attempt 1
    User s5678901 submitted on Sep 25 2017 at 12:13:23 as attempt 2
    User s6789012 submitted on Sep 26 2017 at 15:48:15 as attempt 1
    ... etc ...

Submit Command

Students should in general know how to use the submit command to submit their coursework, however it may be helpful to give examples for your particular course (like the names of exercises). For example:

  • submit dbs cw1 FILENAME
    Here "dbs" is the course and "cw1" is the exercise tag/number.
  • submit
    The command on its own will list valid courses.
  • submit CRS
    The command with a course will list valid exercises for that course.

Submit arguments should by default permit tab-completion through the bash shell. For example, type submit to list all courses, or submit dbs to list all exercises for the course dbs.

It is advisable to either enforce the submitted filename to have no spaces within it (using set_submit_file_names described above) or just recommend students avoid this, as it can complicate the post processing (by requiring extra quoting).

Submit Machines

The submit command and all the other scripts mentioned in this document are installed on all DICE desktops and also multiuser remote login and compute servers.
Last reviewed: 
06/10/2017

System Status

Home dirs (AFS)
Network
Mail
Other services
Scheduled downtime

Choose a topic