New C autograder
Posted on 2024-07-23 by Matt West
Jonatan Schroeder has implemented an awesome new C autograder for PrairieLearn. While courses will always be able to use custom autograders, this provides a robust and secure reference implementation that courses can use directly, or as the basis for their own code.
To test out the new autograder, try the demo/autograder/c/square and demo/autograder/c/drawTriangle questions in the example course.
Some of the features of this new autograder include the ability to test full programs or individual functions, provide additional C files, compile with specific flags, include generated images in test results, and to test programs based on randomly-assigned question parameters.
The new autograder is included by default in the grader-c
docker
image. To take advantage of it you can edit your question's
info.json
file to include:
"externalGradingOptions": {
"image": "prairielearn/grader-c",
"entrypoint": "python3 /grade/tests/test.py"
}
To read more about new grader features you can check out the documentation.