computeMarks — Produce an output file for a given rst suite
computeMarks
computeMarks is a program that must be written for each rst suite. It will be executed for each student.
The computeMarks script is run by default directly on the course account; because of this, it should never execute student code. Its job is to perform any remaining marking and generate an output file.
Within computeMarks, the following environment variables are defined for use. The first several are in common with runTests, but there are additional ones only accessible within computeMarks.
submitdirThe student's submission directory.
tmpdirThe temporary scratch directory available for testing of this student's submission. This directory is also the "current directory" when computeMarks is started.
testdirThe directory containing runTests, computeMarks, and other files required by the test suite.
studentThe userid of the student currently being tested.
assignThe name of the assignment, as passed to rst.
courseThe name of the course that is running this test suite.
answerdirThe directory optionally containing the correct test outputs, generated by rsta.
solutiondirThe directory containing the model solution.
marksheetThe pathname of the mark sheet file for the current student, which will be included at the top of rst's output.
marklistThe pathname of a file shared by all students, which may be used (for example) to track the total marks of each student who submitted an assignment.
There are certain special commands available only within
computeMarks: printFile,
keepFile, deProcessFile,
writeToTestResults and
writeToMarkList.
Take care to make use of these!
Always use keepFile to include files containing
student output instead of dumping them directly into the marksheet,
because keepFile contains safeguards that take
actions such as truncating files that reach a certain length.
Use writeToMarkList instead of writing to
marklist directly to avoid concurrency errors among
multiple rst instances running in parallel on
the same assignment and run_id.