Commit 343567cc authored by Julien Palard's avatar Julien Palard
Browse files

Documenting the checker protocol.

parent cb704f46
...@@ -38,3 +38,26 @@ $ ./ compilemessages ...@@ -38,3 +38,26 @@ $ ./ compilemessages
Exercises (title and wording) are translated via the admin (or the Exercises (title and wording) are translated via the admin (or the
API), we use django-modeltranslation. API), we use django-modeltranslation.
## How does the checker bot work?
The answers are load-balanced to correction workers using Celery, so
you can have multiple machines dedicated to correct loads of answers.
Once received by a worker the worker runs two things:
- An optional `` script, that sets-up anything specific
for this answers (required files and directories, translations,
whatever is needed).
- A `` script is then started in a sandbox (no internet
connectivity, restricted filesystem, CPU, memory usage, …). This is
the script that check the student answer, the protocol is simple: if
the script prints, then then answer is wrong, and what's been
printed is displayed, as Markdown, to the student.
Both `` and `` are in Python, but they're not
limited to check for Python answers, if you want to check for shell
script or C, or whatever, the `` can use `subprocess` to run
the answer script, or compile the answer code, or whatever needed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment