Skip to content

The assignment submission platform for the NCHU CSE Algorithms course, maintained by the NCHU NLP Lab.

License

Notifications You must be signed in to change notification settings

Rui0828/algo_oj_backend-NCHU-CSE

 
 

Repository files navigation

NCHU Algorithm Course Assignment Submission Platform (Deploy, Backend)

For Frontend related modifications, please refer to IdONTKnowCHEK/OnlineJudgeFE-NCHU


[ English | 繁體中文 ]

This platform is modified based on QingdaoU/OnlineJudge, with several new features added to the Backend for course requirements:

  1. Scripted the SSH configuration steps for containers in the DockerFile (to facilitate internal file modifications)
  2. Each assignment is ranked by execution time or memory usage, and grades are assigned based on ranking
  3. Assignments use Java with all import functions disabled by default, but can be selectively enabled as needed
  4. Modified the original Special Judge function to use JSON format for setting assignment deadlines, allowed imports, ranking methods, late submission allowances, and late submission deadlines
  5. Added Expired status to Judge results to mark late submissions

Deploy Step

  1. Clone this repo

    git clone https://github.com/Rui0828/algo_oj_backend-NCHU-CSE.git
  2. Configure environment parameters file .env

    export JUDGE_SERVER_TOKEN=TOKEN
    export BE_USERNAME=Backend-SSH-Username
    export BE_PASSWORD=Backend-SSH-Password
  3. Start Docker Container

    docker-compose -p {container-name} up -d

Ranking by Execution Time or Memory Usage

  • The system automatically selects the best-performing version (time/memory) from each user's submissions for ranking

Image Image

Import Restrictions in Java (with Selective Allowances)

  • If submitted code contains non-allowed import statements, the system will return Compile Error

Image

Special Judge Function Modified to Special Settings

  • Uses JSON format for configuration

Image

  • "expire_time": "2025-3-28T14:00:00" sets assignment deadline (default: no deadline)
  • "allowed_imports": ["java.util.Scanner"] sets allowed imports (default: all disabled)
    • java.util.* means all packages in java.util are allowed
    • * means all packages are allowed
  • "rank_type": "time" sets ranking type, options are time or memory (default: time)
  • "late_allowed": ["ta", "test"] usernames allowed for late submissions
  • "late_until":"2025-3-12T14:00:00" extended deadline for late submissions (default: no extended deadline)

Late Submissions Display Expired Status

Image

Original QDUOJ:

License

MIT

About

The assignment submission platform for the NCHU CSE Algorithms course, maintained by the NCHU NLP Lab.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 98.1%
  • Other 1.9%