SharIF Judge is a free and open source online judge for C, C++, Java and Python programming courses. SharIF Judge is a fork of the original Sharif Judge beautifully created by @mjnaderi. This forked version contain many improvements, mostly due to the needs by our faculty at @ifunpar.
The web interface is written in PHP (CodeIgniter framework) and the main backend is written in BASH.
Python in SharIF Judge is not sandboxed yet. Just a low level of security is provided for python. If you want to use SharIF Judge for python, USE IT AT YOUR OWN RISK or provide sandboxing yourself.
The full documentation is at https://github.com/ifunpar/Sharif-Judge/tree/docs
Download the latest release from https://github.com/ifunpar/Sharif-Judge/releases
The numbering may be confusing, I apologize. However, here are some explanations:
- Branches, sorted from newest to oldest:
Version-1
this is the main branch, since mjnaderi is using this naming for the main branch.Version-1.5
, this is an older branch, containing action replay and (supposedly) PHP 8.3 compatibilityVersion-1.1
, this is an even older branch, compatible up to PHP 7.4, but pretty stabledocs
, documentation branch, similar to mjnaderi's one but maybe with some adjustments- Other branches are undocumented
- Tags and releases, sorted from newest to oldest
v1.5.x-ifunpar
release ofVersion-1.5
branchv1.4.x-ifunpar
release of pre-Version-1.1
branch. Named1.4
because mjnaderi used that. We will no longer use mjnaderi's one.
- Multiple user roles (admin, head instructor, instructor, student)
- Sandboxing (not yet for python)
- 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
- Lock Student's Display Name
- Archived Assignment
- Hall of Fame
- 24-hour Logs
- ...
For running SharIF 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");
) - Tools for compiling and running submitted codes (
gcc
,g++
,javac
,java
,python2
andpython3
commands) - It is better to have
perl
installed for more precise time and memory limit and imposing size limit on output of submitted code.
git clone
and switch to one of the tag, or...- ...download the latest release from release page and unpack downloaded file in your public html directory.
- [Optional] Move folders
system
andapplication
somewhere outside your public directory. Then save their full path inindex.php
file ($system_path
and$application_folder
variables). - Create a MySql or PostgreSql database for SharIF Judge. Do not install any database connection package for C/C++, Java or Python.
- Copy
application/config/config.example.php
toapplication/config/config.php
and updatebase__url
according to your server configuration. - Copy
application/config/database.example.php
toapplication/config/database.php
and update the file according to your database configuration. - Copy
application/config/secrets.example.php
toapplication/config/secrets.php
and update the file according to your RADIUS and SMTP configuration. - Make
application/cache/Twig
writable by php. - Open the main page of SharIF Judge in a web browser and follow the installation process.
- Log in with your admin account.
- [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 SharIF Judge
- Read the documentation
GPL v3