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 @@ -100,6 +100,9 @@ end def submission + # protect the action for Code Jom + redirect_to :action => 'list' + @user = User.find(session[:user_id]) @problems = Problem.find_available_problems if params[:id]==nil diff --git a/app/controllers/statuses_controller.rb b/app/controllers/statuses_controller.rb --- a/app/controllers/statuses_controller.rb +++ b/app/controllers/statuses_controller.rb @@ -1,5 +1,8 @@ class StatusesController < ApplicationController + # protect the statuses, for now + before_filter :admin_authorization + def index problem_count = Problem.available_problem_count diff --git a/app/controllers/test_controller.rb b/app/controllers/test_controller.rb --- a/app/controllers/test_controller.rb +++ b/app/controllers/test_controller.rb @@ -1,5 +1,8 @@ class TestController < ApplicationController + # this page is unavailable in Code Jom + before_filter :admin_authorization + before_filter :authenticate, :check_viewability # diff --git a/app/views/main/_problem_title.html.haml b/app/views/main/_problem_title.html.haml --- a/app/views/main/_problem_title.html.haml +++ b/app/views/main/_problem_title.html.haml @@ -1,7 +1,7 @@ .problem-bar{:id => "problem-bar-#{problem.id}"} %a{:href => "#", :onclick => "$$('.problem-panel').each(function(elt) {elt.hide();}); $('problem-panel-#{problem.id}').show(); $('problem-panel-filler').hide(); return false;"} %span{:class => 'problem-title'} - = "#{problem.full_name} (#{problem.name})" + = "#{problem.full_name}" - if @prob_submissions[problem_title_counter][:count] > 0 = "[#{@prob_submissions[problem_title_counter][:count]} trials(s)]" - else diff --git a/app/views/main/list.html.haml b/app/views/main/list.html.haml --- a/app/views/main/list.html.haml +++ b/app/views/main/list.html.haml @@ -21,7 +21,8 @@ = render :partial => 'problem_title', :collection => @problems, :as => :problem .problem-content %span{:id => "problem-panel-filler", :style => (@current_problem_id!=nil) ? "display:none" : ""} - %b Welcome to Code Jom + %h2 + Welcome to Code Jom %br/ Choose problems from the list on the right. = render :partial => 'problem', :collection => @problems