2021-01-02 16:49:12 +09:00
LQDOJ: Le Quy Don Online Judge
===
[](https://lqdoj.edu.vn/)
[](https://python.org)
[](https://ubuntu.com/download)
2021-01-02 20:23:11 +09:00
[](https://www.gnu.org/licenses/agpl-3.0.en.html)
2021-01-02 16:49:12 +09:00
## Overview
Homepage: [https://lqdoj.edu.vn ](https://lqdoj.edu.vn )
2021-01-02 16:55:04 +09:00
Based on [DMOJ ](https://dmoj.ca/ ).
2021-01-02 16:49:12 +09:00
Supported languages:
- Assembly (x64)
- AWK
- C
- C++03 / C++11 / C++14 / C++17
- Java 11
- Pascal
- Perl
- Python 2 / Python 3
2021-01-02 17:12:18 +09:00
Support plagiarism detection via [Stanford MOSS ](https://theory.stanford.edu/~aiken/moss/ ).
2021-01-02 16:49:12 +09:00
## Installation
2021-01-02 02:29:58 -06:00
Most of the setup are the same as DMOJ installations. You can view the installation guide of DMOJ here: https://docs.dmoj.ca/#/site/installation .
There is one minor change: Instead of `git clone https://github.com/DMOJ/site.git` , you clone this repo `git clone https://github.com/LQDJudge/online-judge.git` .
2021-01-10 20:47:36 -06:00
### Additional Steps in Production:
1. To use newsletter (email sending), go to admin and create a newsletter.
2. Change the domain name and website name in Admin page: Navigation Bars/Sites
### Some frequent difficulties when installation:
2021-01-02 02:29:58 -06:00
1. Missing the `local_settings.py` . You need to copy the `local_settings.py` in order to pass the check.
2. Missing the problem folder in `local_settings.py` . You need to create a folder to contain all problem packages and configure in `local_settings.py` .
3. Missing static folder in `local_settings.py` . Similar to problem folder, make sure to configure `STATIC_FILES` inside `local_settings.py` .
4. Missing configure file for judges. Each judge must have a seperate configure file. To create this file, you can run `python dmojauto-conf` . Checkout all sample files here https://github.com/DMOJ/docs/blob/master/sample_files.
2021-01-02 17:12:18 +09:00
## Usage
2021-01-02 02:29:58 -06:00
Suppose you finished all the installation. Everytime you want to run a local server, follow these steps:
1. Activate virtualenv:
2021-01-02 16:49:12 +09:00
```bash
2020-01-21 12:00:50 -06:00
source dmojsite/bin/activate
2021-01-02 16:49:12 +09:00
```
2021-01-02 02:29:58 -06:00
2. Run server:
2021-01-02 16:49:12 +09:00
```bash
2020-01-21 12:00:50 -06:00
python manage.py runserver 0.0.0.0:8000
2021-01-02 16:49:12 +09:00
```
2020-01-21 12:00:50 -06:00
2021-01-02 02:29:58 -06:00
3. Create a bridge (this is opened in a different terminal with the second step if you are using the same machine)
2021-01-02 16:49:12 +09:00
```bash
2021-01-02 02:29:58 -06:00
python manage.py runbridged
2021-01-02 16:49:12 +09:00
```
2020-01-21 12:00:50 -06:00
2021-01-02 02:29:58 -06:00
4. Create a judge (another terminal)
2021-01-02 16:49:12 +09:00
```bash
2021-01-02 02:29:58 -06:00
dmoj 0.0.0.0 -p 9999 -c < path to yml configure file >
2021-01-02 16:49:12 +09:00
```
2021-01-02 02:29:58 -06:00
Here we suppose you use the default port 9999 for bridge in `settings.py` . You can create multiple judges, each should be in a seperate terminal.
2021-01-02 02:34:51 -06:00
**Optional**
5. Run celery worker (This is server's queue. It may be necessary in some functions)
```bash
celery -A dmoj_celery worker
```
6. Run a live event server (So everything is updated lively like in the production)
```bash
node websocket/daemon.js
```
2021-01-02 02:29:58 -06:00
## Deploy
Most of the steps are similar to Django tutorials. Here are two usual steps:
2020-01-21 12:00:50 -06:00
2021-01-02 02:29:58 -06:00
1. Update vietnamese translation:
2021-01-02 02:38:57 -06:00
- If you add any new phrases in the code, ```python manage.py makemessages` ``
2021-01-02 16:49:12 +09:00
- go to `locale/vi`
- modify `.po` file
2021-01-02 02:38:57 -06:00
- ```python manage.py compilemessages` ``
- ```python manage.py compilejsi18n` ``
2020-03-15 20:28:46 -06:00
2021-01-02 02:29:58 -06:00
2. Update styles (using SASS)
- Change .css/.scss files in `resources` folder
2021-01-02 02:38:57 -06:00
- ```./make_style && python manage.py collectstatic` ``
2021-01-02 02:29:58 -06:00
- Sometimes you need to `Ctrl + F5` to see the new user interface in browser.
2021-01-02 16:49:12 +09:00
## Screenshots
### Leaderboard
Leaderboard with information about contest rating, performance points and real name of all users.

### Admin dashboard
Admin dashboard helps you easily managing problems, users, contests and blog posts.

### Statement editor
You can write the problems' statement in Markdown with LaTeX figures and formulas supported.

### Chat
Users can communicate with each other and can see who's online.
2021-01-02 02:29:58 -06:00
