diff --git a/app/controllers/main_controller.rb b/app/controllers/main_controller.rb --- a/app/controllers/main_controller.rb +++ b/app/controllers/main_controller.rb @@ -1,7 +1,5 @@ class MainController < ApplicationController - SYSTEM_MODE_CONF_KEY = 'system.mode' - before_filter :authenticate, :except => [:index, :login] before_filter :check_viewability, :except => [:index, :login] @@ -59,8 +57,7 @@ end @submission.submitted_at = Time.new.gmtime - if Configuration[SYSTEM_MODE_CONF_KEY]=='contest' and - user.site!=nil and user.site.finished? + if Configuration.time_limit_mode? and user.contest_finished? @submission.errors.add_to_base "The contest is over." prepare_list_information render :action => 'list' and return