THIS PLUGIN IS STILL UNDER DEVELOPMENT AND NOT SUTIABLE FOR PRODUCTION SITES
The Online Judge 2 plugin for Moodle 2 is designed for courses involving programming. It can automatically grade submitted source code by testing them against customizable test cases (ACM-ICPC/Online Judge style).
It contains:
- A local plugin call judgelib which provides the essential abilities of online judge. It works like a library.
- A assignment type plugin call online judge which provides a UI to teachers and students and calls the judgelib to judge submissions.
There are two judge engines:
- Sandbox compiles and executes programs on the server in a protected environment. Supports C and C++ only.
- Ideone posts all data to ideone.com which compiles and executes programs remotely. Supports 40+ languaes, such as C/C++, Java, Python, C#, JavaScript, Perl, PHP.
The workflow is:
- Administrators set global settings in judgelib.
- Teachers create Online Judge Assignment Activities and setup testcases etc.
- Students submit code in Online Judge Assignment Activities.
- A judge daemon judges the submissions in backgroud.
- Teachers and students get judge results in Online Judge Assignment Activities.
- php-cli
- make, gcc and g++ (optional but recommended)
- pcntl and posix extension in php-cli (optional but recommended)
- php-cli
Download it from https://github.com/hit-moodle/moodle-local_onlinejudge2/archives/master
or using git:
git clone git://github.com/hit-moodle/moodle-local_onlinejudge2.git onlinejudge2
MOODLE_PATH means the root path of your moodle installation.
- Make sure the directory name of this plugin is
onlinejudge2
. If not, rename it. - If the directory
MOODLE_PATH/local/onlinejudge2/
exists, remove it. - Put
onlinejudge2
intoMOODLE_PATH/local/
cd MOODLE_PATH/local/onlinejudge2 && ./install_assignment_type
- Login your site as admin and the plugins can be installed/upgraded.
sudo -u www-data php MOODLE_PATH/local/onlinejudge2/cli/judged.php
- If you want to use sandbox judge engine, then
cd MOODLE_PATH/mod/assignment/type/onlinejudge/judge/sandbox/sand/ && make
- Make sure the folder name of this plugin is
onlinejudge2
. If not, rename it. - If the folder
MOODLE_PATH\local\onlinejudge2\
exists, remove it. - If the folder
MOODLE_PATH\mod\assignment\type\onlinejudge
exists, remove it. - Put
onlinejudge2
intoMOODLE_PATH\local\
- copy MOODLE_PATH\local\onlinejudge2\clients\mod\assignment\type\onlinejudge\ to MOODLE_PATH\mod\assignment\type\
- Login your site as admin and the plugins can be installed/upgraded.
php.exe MOODLE_PATH\local\onlinejudge2\cli\judged.php
Home:
Bug reports, feature requests, help wanted and other issues: