diff --git a/app/views/problems/stat.html.erb b/app/views/problems/stat.html.erb
--- a/app/views/problems/stat.html.erb
+++ b/app/views/problems/stat.html.erb
@@ -13,6 +13,7 @@
<% count = 0 %>
<% @submissions.each do |sub| %>
+ <% next unless sub.user %>
">
<%= sub.user.login %> |
<%= sub.user.full_name if sub.user %> |
diff --git a/app/views/users/profile.html.haml b/app/views/users/profile.html.haml
--- a/app/views/users/profile.html.haml
+++ b/app/views/users/profile.html.haml
@@ -6,6 +6,11 @@
$('#submission_table').tablesorter({widgets: ['zebra','filter']});
});
+:css
+ .fix-width {
+ font-family: Droid Sans Mono,Consolas, monospace, mono, Courier New, Courier;
+ }
+
%h1= @user.full_name + ' Profile'
%h2 Basic info
@@ -28,12 +33,13 @@
%th Score
%tbody
- @submission.each do |s|
+ - next unless s.problem
%tr
%td= link_to "#{s.id}", controller: "graders", action: "submission", id: s.id
%td= s.problem.name
%td= s.problem.full_name
%td= s.language.pretty_name
- %td{style: 'font-family: Droid Sans Mono,Consolas, monospace, mono'}= s.grader_comment
+ %td.fix-width= s.grader_comment
%td= s.points/s.problem.full_score * 100
diff --git a/config/application.rb.SAMPLE b/config/application.rb.SAMPLE
--- a/config/application.rb.SAMPLE
+++ b/config/application.rb.SAMPLE
@@ -60,5 +60,6 @@
config.assets.version = '1.0'
config.assets.precompile += ['announcement_refresh.js','effects.js','site_update.js','graders.css','problems.css']
+ config.assets.precompile += ['new.js','tablesorter-theme.cafe.css']
end
end
diff --git a/db/schema.rb b/db/schema.rb
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -15,12 +15,12 @@
create_table "announcements", :force => true do |t|
t.string "author"
- t.text "body"
+ t.text "body", :limit => 16777215
t.boolean "published"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
- t.boolean "frontpage", :default => false
- t.boolean "contest_only", :default => false
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ t.boolean "frontpage", :default => false
+ t.boolean "contest_only", :default => false
t.string "title"
t.string "notes"
end
@@ -50,19 +50,19 @@
end
create_table "descriptions", :force => true do |t|
- t.text "body"
+ t.text "body", :limit => 16777215
t.boolean "markdowned"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
end
create_table "grader_configurations", :force => true do |t|
t.string "key"
t.string "value_type"
t.string "value"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
- t.text "description"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ t.text "description", :limit => 16777215
end
create_table "grader_processes", :force => true do |t|
@@ -97,10 +97,10 @@
t.integer "sender_id"
t.integer "receiver_id"
t.integer "replying_message_id"
- t.text "body"
+ t.text "body", :limit => 16777215
t.boolean "replied"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
end
create_table "problems", :force => true do |t|
@@ -142,7 +142,7 @@
create_table "sessions", :force => true do |t|
t.string "session_id"
- t.text "data"
+ t.text "data", :limit => 16777215
t.datetime "updated_at"
end
@@ -163,19 +163,16 @@
t.integer "user_id"
t.integer "problem_id"
t.integer "language_id"
- t.text "source"
+ t.text "source", :limit => 16777215
t.binary "binary"
t.datetime "submitted_at"
t.datetime "compiled_at"
- t.text "compiler_message"
+ t.text "compiler_message", :limit => 16777215
t.datetime "graded_at"
t.integer "points"
- t.text "grader_comment"
+ t.text "grader_comment", :limit => 16777215
t.integer "number"
t.string "source_filename"
- t.float "max_runtime"
- t.integer "peak_memory"
- t.integer "effective_code_length"
end
add_index "submissions", ["user_id", "problem_id", "number"], :name => "index_submissions_on_user_id_and_problem_id_and_number", :unique => true
@@ -190,10 +187,10 @@
create_table "test_pairs", :force => true do |t|
t.integer "problem_id"
- t.text "input", :limit => 16777215
- t.text "solution", :limit => 16777215
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
+ t.text "input", :limit => 2147483647
+ t.text "solution", :limit => 2147483647
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
end
create_table "test_requests", :force => true do |t|
@@ -204,13 +201,13 @@
t.string "output_file_name"
t.string "running_stat"
t.integer "status"
- t.datetime "updated_at", :null => false
+ t.datetime "updated_at", :null => false
t.datetime "submitted_at"
t.datetime "compiled_at"
- t.text "compiler_message"
+ t.text "compiler_message", :limit => 16777215
t.datetime "graded_at"
t.string "grader_comment"
- t.datetime "created_at", :null => false
+ t.datetime "created_at", :null => false
t.float "running_time"
t.string "exit_status"
t.integer "memory_usage"