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 @@ -8,6 +8,7 @@ def index @user = User.find(session[:user_id]) prepare_index_information + @test_requests = @user.test_requests end def submit diff --git a/app/models/user.rb b/app/models/user.rb --- a/app/models/user.rb +++ b/app/models/user.rb @@ -4,7 +4,7 @@ has_and_belongs_to_many :roles - has_many :test_requests, :order => "problem_id" + has_many :test_requests, :order => "submitted_at DESC" validates_presence_of :login validates_presence_of :full_name diff --git a/app/views/test/_test_request.html.haml b/app/views/test/_test_request.html.haml --- a/app/views/test/_test_request.html.haml +++ b/app/views/test/_test_request.html.haml @@ -3,9 +3,9 @@ %td= test_request.problem.full_name %td= test_request.submission.number %td= test_request.status_str - %td= test_request.running_stat or '' + %td= simple_format((test_request.running_stat or '')) %td - if test_request.output_file_name!=nil = link_to '[output]', :action => 'read', :id => test_request.id %td= test_request.grader_comment or '' - %td= test_request.compiler_message or '' + %td= simple_format((test_request.compiler_message or '')) diff --git a/app/views/test/index.html.erb b/app/views/test/index.html.erb --- a/app/views/test/index.html.erb +++ b/app/views/test/index.html.erb @@ -66,7 +66,7 @@