Vocareum's platform provides the ability to auto-generate simple scripts to facilitate the automatic grading of student assignments based on output comparison or exit status. Grades are reported through the use of a CSV grading file. 

Here are the necessary steps to set this up - 

1) Under the Part Setup, turn on the "Autogenerate scripts" option - 

2) Optionally, enter in an initialization script which can help setup the grading environment. This script will run before the grading code. In the following example, we will use the initialization script to compile Factorial.cpp into factorial.exe.

3) Select the "Autograde" checkbox to enable automatic running of the grading script, then click the "Autdograde" link.

4) The following screen appears when the Autograde link is clicked. Decide on the Grading Approach - 

  • Compare Output - run the command with a given set of standard inputs, then compare with the expected output.
  • Check Command Exit Status - run the Command. Success, if the exit status is "0"; otherwise Failure.

5) Enter the "Command" to be run based on the given Grading Approach.

6) If using output comparison, fill in the "Standard Input" and "Expected Output" text boxes.

7) Click "Close", then "Save" to commit your Grading setup changes and to generate the scripts.

8) In the above example, the following files are automatically generated:

../resource/scripts/grade.sh

../resource/asnlib/input1.txt

../resource/asnlib/output1.txt

Did this answer your question?