Wecode, a rewritten of Wecode Judge, is a free and open source online judge for programming courses.
Wecode judge employ docker to contain and execute the user submitted code. The web interface is written in PHP (CodeIgniter framework) and the main backend is written in BASH.
The full documentation is at https://github.com/truongan/wecode-judge/tree/docs
Download the latest release by cloning this repository.
- Multiple user roles (admin, head instructor, instructor, student)
- Sandboxing using docker
- Cheat detection (similar codes detection) using Moss
- Custom rule for grading late submissions
- Submission queue
- Download results in excel file
- Download submitted codes in zip file
- "Output Comparison" and "Tester Code" methods for checking output correctness
- Add multiple users
- Problem Descriptions (PDF/Markdown/HTML)
- Rejudge
- Scoreboard
- Notifications
- Code template for "fill in the blank" assignments where instructor supply a portion of the code and student finish it.
- ...
For running Wecode judge, a Linux server with following requirements is needed:
- Written using Laravel 7, wecode judge share the server requirement with its framework
- MySql or PostgreSql database
- PHP must have permission to run shell commands using
shell_exec()
php function (speciallyshell_exec("php");
). - composer should be install
- Docker! (wecode judge can use native tools for compiling and running submitted codes but that's a severe security risk, planned to be removed)
- It is better to have
perl
installed for more precise time and memory limit and imposing size limit on output of submitted code.
- Clone latest release from github repository into a directory with read/write permission. Then put the index.php file in your webserver's serving directory
- Create a MySql or PostgreSql database for Wecode judge.
- Copy
.env.example
to.env
and edit database settings - cd into your
wecode
directory and run./install.sh
- Open the main page of Wecode in a web browser and follow the installation process.
Since wecode-jduge use docker to isolate the submitted code, you have to setup docker and other settings so that judge can call it.
- Install docker-ce in your server. The instruction for Ubuntu can be found on docker guide
- Follow docker instruction to allow http user manage docker: https://docs.docker.com/install/linux/linux-postinstall/
-
[IMPORTANT] Move folders
tester
andassignments
somewhere outside your public directory. Then save their full path inSettings
page. These two folders must be writable by PHP. Submitted files will be stored inassignments
folder. So it should be somewhere not publicly accessible. -
[IMPORTANT] Secure Wecode judge
-
Read the documentation
GPL v3