#Wecode
Wecode judge, originally forked fromSharif 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:
- Webserver running PHP version 5.3 or later with
mysqli
extension - PHP CLI (PHP command line interface, i.e.
php
shell command) - MySql or PostgreSql database
- PHP must have permission to run shell commands using
shell_exec()
php function (speciallyshell_exec("php");
) - 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
- Take note the location of
system
andapplication
folders, then record their full path inindex.php
file (edit the$system_path
and$application_folder
variables). - Create a MySql or PostgreSql database for Wecode judge.
- Copy
application/config/database.php.example
toapplication/config/database.php
and edit it to suit database connection settings you create in the previous step. - Copy
application/config/config.php.example
toapplication/config/config.php
and edit base_url settings. Wecode judge won't try to guess your site url, you have to set this settings. - Make sure
application/cache/Twig
is writable by php process. - Open the main page of Wecode judge 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: https://docs.docker.com/install/linux/docker-ce/ubuntu/
- 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]https://github.com/truongan/wecode-judge/tree/docs)
GPL v3