This is the grading system behind http://arena.maycamp.com. It started as a fork of spoj0, but at the end was almost completely reimplemented.
Ruby HTML Gherkin CSS C++ JavaScript Other
Clone or download
valo Merge pull request #140 from valo/make-current-contests-visible-if-any
Make the current and upcoming contests visible by default
Latest commit 5c84c53 Sep 7, 2017
Permalink
Failed to load latest commit information.
app Make the current and upcoming contests visible by default Sep 7, 2017
bin Moved the problems runs into a separate controller May 17, 2016
config Fixed the GA tracking and the sidekiq concurrency Sep 3, 2016
db Added leveling avatars and experience tracking Sep 3, 2016
doc Reorganized the project Feb 17, 2010
ext Fixing hard stuck processes while testing Jun 24, 2015
features Added leveling avatars and experience tracking Sep 3, 2016
lib Remove the ratings from the system Jun 23, 2016
provisioning Ansible configuration for 2 grader deployment Apr 5, 2015
public Moved the images in the asset pipeline. Changed the CSS to use the as… Oct 25, 2014
sandbox WIP on the sandboxing using docker. Nov 9, 2014
script First cut into migrating the app to rails 3 Mar 3, 2011
spec Fixing the build Sep 4, 2016
test Added leveling avatars and experience tracking Sep 3, 2016
tmp Ignore everything in tmp, but keep the fodler around Mar 1, 2015
vendor/plugins .DS_store is also not needed Nov 1, 2014
.dockerignore Adjust the vagrant config. Dec 1, 2014
.gitignore Completely remove the external contest results Jun 23, 2016
.gitmodules Adding ezgraphix as a submodule Jun 10, 2010
.rspec Rspec config Mar 1, 2015
.travis.yml Updating the ruby version in travis CI May 23, 2016
Capfile Added capistrano deployment of the sidekiq Sep 2, 2016
Dockerfile Hack Bulgaria changes during our Algorithms class deploy Sep 15, 2015
Gemfile Capistrano config is not needed Sep 2, 2016
Gemfile.lock Added capistrano deployment of the sidekiq Sep 2, 2016
README.md fix a typo in the docs (hostname for the grader configuration). Aug 1, 2016
Rakefile First cut into migrating the app to rails 3 Mar 3, 2011
Vagrantfile Removed an unused CSS file Oct 26, 2015
config.ru First cut into migrating the app to rails 3 Mar 3, 2011
main_controller_spec.patch main controller spec Jul 1, 2015
unicorn.ru First cut into migrating the app to rails 3 Mar 3, 2011

README.md

Maycamp Arena

Spoj0 for students


Status

Gemnasium Status Travis CI Status


Table of Contents


Description

The idea of this project is to provide a grading system for competitions in informatics (IOI style). The main target group is high school students.

The system contains two main components:

  • Web part
  • Grader

The web part is a Ruby on Rails application, contained in the app folder.

The grader compiles the source code and runs the binary inside multiple docker containers and feeds each one with the given test cases. It monitors the consumption of the system resources - time limit, memory limit, etc..

Go back


Features

  • Participation in live contests.
  • Practicing old contests.
  • Grouping contests by categories.
  • Grouping problems by categories.
  • Evaluation of regular input/output tasks
  • Answer evaluation using checker
  • Supported programming languages:
  • C/C++
  • Java
  • Python 2 & 3
  • Possibility for integrating more than one grader on different machines.

Go back


Installation

The following steps describe how to run the project on a local environment for developing purposes. The best and fastest way to get the project up and running is to use the already configured Vagrant virtual development environment.

Dependencies

General

  • Git
  • MySQL Server 5.5+ or MariaDB is preferred
  • Ruby 2.1+ (the easiest way is to use RVM or rbenv)

Additional

(for the virtual environment)

Setup

Web part

Download the project and initialize the virtual environment.

$ git clone https://github.com/valo/maycamp_arena.git
$ cd maycamp_arena
$ vagrant up

This last command may take a while to execute, considering the fact that the proper virtual box binary must be downloaded and provisioned.

Configure the ruby version. Keep in mind that rvm is already installed on the virtual machine.

NB! vm is just a placeholder for vagrant@vagrant-ubuntu-trusty64

$ vagrant ssh
vm$ rvm install 2.1.1
vm$ rvm use 2.1.1
vm$ cd /vagrant

Install the MySQL server. It is recommended to leave the root user without password (blank password), otherwise you should change the configurations.

vm$ sudo apt-get install mysql-server

Install the package dependencies and run the database migrations with:

vm$ bundle install
vm$ bundle exec rake db:create db:setup

After you have successfully completed the installation process of the web application you can start the server with:

$vm /vagrant/bin/rails server -b 0.0.0.0

and access it in your browser on localhost:3030.

Grader

Getting the grader up and running is done with:

vm$ cd /vagrant
vm$ gem install god
vm$ docker build -t grader .
vm$ printf "vagrant-ubuntu-trusty-64:\n rsync: /vagrant/sets" > config/grader.yml

and running it with:

vm$ /home/vagrant/.rvm/bin/rvm 2.1 do bundle exec rake RAILS_ENV=production grader:start

Running the tests

To run the tests execute:

$ bundle exec cucumber

Access

After you have successfully set up the project you can log in with the dummy admin account:

username: admin
password: 123123

Go back