Name

computeMarks — Produce an output file for a given rst suite

Synopsis

computeMarks

Description

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.

computeMarks Environment

Environment Variables

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.

submitdir

The student's submission directory.

tmpdir

The temporary scratch directory available for testing of this student's submission. This directory is also the "current directory" when computeMarks is started.

testdir

The directory containing runTests, computeMarks, and other files required by the test suite.

student

The userid of the student currently being tested.

assign

The name of the assignment, as passed to rst.

course

The name of the course that is running this test suite.

answerdir

The directory optionally containing the correct test outputs, generated by rsta.

solutiondir

The directory containing the model solution.

marksheet

The pathname of the mark sheet file for the current student, which will be included at the top of rst's output.

marklist

The 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.

Utilities

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.

Topic revision: r1 - 2016-01-11 - YiLee
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback