vzaccaria / gitbook2edx-external-grader

External grader infrastructure for Edx

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gitbook2edx-external-grader NPM version

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

General help

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

Running

You can run the external grader in two configurations:

  1. As a server
  2. As a command line tool to run jailed programs

Running as a server

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)

Adding your own script engine

TBD

Managing the server

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.

Development

Tests

Tests are categorized in two parts:

  1. Integration tests for the server part (via supertest);
  2. 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).

Author

Vittorio Zaccaria

License

Copyright (c) 2015 Vittorio Zaccaria
Released under the BSD license


This file was generated by verb on February 11, 2015.

About

External grader infrastructure for Edx

License:MIT License


Languages

Language:C++ 97.8%Language:LiveScript 1.2%Language:CMake 0.4%Language:Ruby 0.2%Language:JavaScript 0.1%Language:Shell 0.1%Language:Batchfile 0.0%Language:MATLAB 0.0%