external grader engine for edx
Warning: Still in the experimental stage; may break at any moment.
Install globally with npm:
npm i -g gitbook2edx-external-grader
Usage:
gitbook2edx-external-grader serve [ -p PORT ]
gitbook2edx-external-grader run [ -e ENGINE ] [ -d | --dry ] CODE
gitbook2edx-external-grader -h | --help
Options:
-p, --port PORT port to expose as a push endpoint for edx (def. 1666)
-e, --engine ENGINE engine to be used to run scripts ([octave, node])
-d, --dry dry run
Arguments:
CODE the code to be executed; default: javascript
You can run the external grader in two configurations:
- As a server
- As a command line tool to run jailed programs
Simply invoking on the command line with serve
starts the server listening on the specified port (default: 1666). At the moment, the grader has an app-armor profile for the following languages:
- Javascript (through NodeJS)
TBD
To easily manage the server (optional), there are two npm scripts (start
and stop
) to make you run the grader in server mode and expose it to the internet. These scripts use pm2
to start and stop both the grader and an ngrok
server. The ngrok server should be configured with an .ngrok
file; this is my ~/.ngrok
file:
auth_token: your auth token
tunnels:
grader:
subdomain: "grader.cms.zaccaria"
proto:
http: 1666
After ngrok
started, the server is reachable in this case at: http://grader.cms.zaccaria.ngrok.com
. This is the address to use for the Edx push xqueue
.
Tests are categorized in two parts:
- Integration tests for the server part (via
supertest
); - Command line execution: these test the sequencing of actions that should be done when launching an application through a confinement system (if it is available for your platform).
Vittorio Zaccaria
Copyright (c) 2015 Vittorio Zaccaria
Released under the BSD license
This file was generated by verb on February 11, 2015.