Description:
merge from java-bm, fix profile issue and modify application.rb.SAMPLE
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r436:cafc387838eb - - 4 files changed: 34 inserted, 29 deleted
@@ -10,12 +10,13 | |||||
|
10 | <th>submitted_at</th> |
|
10 | <th>submitted_at</th> |
|
11 | <th>points</th> |
|
11 | <th>points</th> |
|
12 | <th>comment</th> |
|
12 | <th>comment</th> |
|
13 | </tr> |
|
13 | </tr> |
|
14 | <% count = 0 %> |
|
14 | <% count = 0 %> |
|
15 | <% @submissions.each do |sub| %> |
|
15 | <% @submissions.each do |sub| %> |
|
|
16 | + <% next unless sub.user %> | ||
|
16 | <tr class="<%= (count % 2 ==0) ? "info-even" : "info-odd" %>"> |
|
17 | <tr class="<%= (count % 2 ==0) ? "info-even" : "info-odd" %>"> |
|
17 | <td><%= sub.user.login %></td> |
|
18 | <td><%= sub.user.login %></td> |
|
18 | <td><%= sub.user.full_name if sub.user %></td> |
|
19 | <td><%= sub.user.full_name if sub.user %></td> |
|
19 | <td><%= sub.submitted_at.to_s %></td> |
|
20 | <td><%= sub.submitted_at.to_s %></td> |
|
20 | <td><%= sub.points %></td> |
|
21 | <td><%= sub.points %></td> |
|
21 | <td><div style="font-family: monospace"><%= sub.grader_comment %></div></td> |
|
22 | <td><div style="font-family: monospace"><%= sub.grader_comment %></div></td> |
@@ -3,12 +3,17 | |||||
|
3 |
|
3 | ||
|
4 | %script{:type=>"text/javascript"} |
|
4 | %script{:type=>"text/javascript"} |
|
5 | $(function () { |
|
5 | $(function () { |
|
6 | $('#submission_table').tablesorter({widgets: ['zebra','filter']}); |
|
6 | $('#submission_table').tablesorter({widgets: ['zebra','filter']}); |
|
7 | }); |
|
7 | }); |
|
8 |
|
8 | ||
|
|
9 | + :css | ||
|
|
10 | + .fix-width { | ||
|
|
11 | + font-family: Droid Sans Mono,Consolas, monospace, mono, Courier New, Courier; | ||
|
|
12 | + } | ||
|
|
13 | + | ||
|
9 | %h1= @user.full_name + ' Profile' |
|
14 | %h1= @user.full_name + ' Profile' |
|
10 |
|
15 | ||
|
11 | %h2 Basic info |
|
16 | %h2 Basic info |
|
12 | <b>Login:</b> #{@user.login} <br/> |
|
17 | <b>Login:</b> #{@user.login} <br/> |
|
13 | <b>Full name:</b> #{@user.full_name} <br /> |
|
18 | <b>Full name:</b> #{@user.full_name} <br /> |
|
14 |
|
19 | ||
@@ -25,16 +30,17 | |||||
|
25 | %th Problem name |
|
30 | %th Problem name |
|
26 | %th Language |
|
31 | %th Language |
|
27 | %th Result |
|
32 | %th Result |
|
28 | %th Score |
|
33 | %th Score |
|
29 | %tbody |
|
34 | %tbody |
|
30 | - @submission.each do |s| |
|
35 | - @submission.each do |s| |
|
|
36 | + - next unless s.problem | ||
|
31 | %tr |
|
37 | %tr |
|
32 | %td= link_to "#{s.id}", controller: "graders", action: "submission", id: s.id |
|
38 | %td= link_to "#{s.id}", controller: "graders", action: "submission", id: s.id |
|
33 | %td= s.problem.name |
|
39 | %td= s.problem.name |
|
34 | %td= s.problem.full_name |
|
40 | %td= s.problem.full_name |
|
35 | %td= s.language.pretty_name |
|
41 | %td= s.language.pretty_name |
|
36 | - %td{style: 'font-family: Droid Sans Mono,Consolas, monospace, mono'}= s.grader_comment |
|
42 | + %td.fix-width= s.grader_comment |
|
37 | %td= s.points/s.problem.full_score * 100 |
|
43 | %td= s.points/s.problem.full_score * 100 |
|
38 |
|
44 | ||
|
39 |
|
45 | ||
|
40 |
|
46 |
@@ -57,8 +57,9 | |||||
|
57 | config.assets.enabled = true |
|
57 | config.assets.enabled = true |
|
58 |
|
58 | ||
|
59 | # Version of your assets, change this if you want to expire all your assets |
|
59 | # Version of your assets, change this if you want to expire all your assets |
|
60 | config.assets.version = '1.0' |
|
60 | config.assets.version = '1.0' |
|
61 |
|
61 | ||
|
62 | config.assets.precompile += ['announcement_refresh.js','effects.js','site_update.js','graders.css','problems.css'] |
|
62 | config.assets.precompile += ['announcement_refresh.js','effects.js','site_update.js','graders.css','problems.css'] |
|
|
63 | + config.assets.precompile += ['new.js','tablesorter-theme.cafe.css'] | ||
|
63 | end |
|
64 | end |
|
64 | end |
|
65 | end |
@@ -12,18 +12,18 | |||||
|
12 | # It's strongly recommended to check this file into your version control system. |
|
12 | # It's strongly recommended to check this file into your version control system. |
|
13 |
|
13 | ||
|
14 | ActiveRecord::Schema.define(:version => 20140826095949) do |
|
14 | ActiveRecord::Schema.define(:version => 20140826095949) do |
|
15 |
|
15 | ||
|
16 | create_table "announcements", :force => true do |t| |
|
16 | create_table "announcements", :force => true do |t| |
|
17 | t.string "author" |
|
17 | t.string "author" |
|
18 | - t.text "body" |
|
18 | + t.text "body", :limit => 16777215 |
|
19 | t.boolean "published" |
|
19 | t.boolean "published" |
|
20 | - t.datetime "created_at", :null => false |
|
20 | + t.datetime "created_at", :null => false |
|
21 | - t.datetime "updated_at", :null => false |
|
21 | + t.datetime "updated_at", :null => false |
|
22 | - t.boolean "frontpage", :default => false |
|
22 | + t.boolean "frontpage", :default => false |
|
23 | - t.boolean "contest_only", :default => false |
|
23 | + t.boolean "contest_only", :default => false |
|
24 | t.string "title" |
|
24 | t.string "title" |
|
25 | t.string "notes" |
|
25 | t.string "notes" |
|
26 | end |
|
26 | end |
|
27 |
|
27 | ||
|
28 | create_table "contests", :force => true do |t| |
|
28 | create_table "contests", :force => true do |t| |
|
29 | t.string "title" |
|
29 | t.string "title" |
@@ -47,25 +47,25 | |||||
|
47 | t.string "name" |
|
47 | t.string "name" |
|
48 | t.datetime "created_at", :null => false |
|
48 | t.datetime "created_at", :null => false |
|
49 | t.datetime "updated_at", :null => false |
|
49 | t.datetime "updated_at", :null => false |
|
50 | end |
|
50 | end |
|
51 |
|
51 | ||
|
52 | create_table "descriptions", :force => true do |t| |
|
52 | create_table "descriptions", :force => true do |t| |
|
53 | - t.text "body" |
|
53 | + t.text "body", :limit => 16777215 |
|
54 | t.boolean "markdowned" |
|
54 | t.boolean "markdowned" |
|
55 | - t.datetime "created_at", :null => false |
|
55 | + t.datetime "created_at", :null => false |
|
56 | - t.datetime "updated_at", :null => false |
|
56 | + t.datetime "updated_at", :null => false |
|
57 | end |
|
57 | end |
|
58 |
|
58 | ||
|
59 | create_table "grader_configurations", :force => true do |t| |
|
59 | create_table "grader_configurations", :force => true do |t| |
|
60 | t.string "key" |
|
60 | t.string "key" |
|
61 | t.string "value_type" |
|
61 | t.string "value_type" |
|
62 | t.string "value" |
|
62 | t.string "value" |
|
63 | - t.datetime "created_at", :null => false |
|
63 | + t.datetime "created_at", :null => false |
|
64 | - t.datetime "updated_at", :null => false |
|
64 | + t.datetime "updated_at", :null => false |
|
65 | - t.text "description" |
|
65 | + t.text "description", :limit => 16777215 |
|
66 | end |
|
66 | end |
|
67 |
|
67 | ||
|
68 | create_table "grader_processes", :force => true do |t| |
|
68 | create_table "grader_processes", :force => true do |t| |
|
69 | t.string "host", :limit => 20 |
|
69 | t.string "host", :limit => 20 |
|
70 | t.integer "pid" |
|
70 | t.integer "pid" |
|
71 | t.string "mode" |
|
71 | t.string "mode" |
@@ -94,16 +94,16 | |||||
|
94 | end |
|
94 | end |
|
95 |
|
95 | ||
|
96 | create_table "messages", :force => true do |t| |
|
96 | create_table "messages", :force => true do |t| |
|
97 | t.integer "sender_id" |
|
97 | t.integer "sender_id" |
|
98 | t.integer "receiver_id" |
|
98 | t.integer "receiver_id" |
|
99 | t.integer "replying_message_id" |
|
99 | t.integer "replying_message_id" |
|
100 | - t.text "body" |
|
100 | + t.text "body", :limit => 16777215 |
|
101 | t.boolean "replied" |
|
101 | t.boolean "replied" |
|
102 | - t.datetime "created_at", :null => false |
|
102 | + t.datetime "created_at", :null => false |
|
103 | - t.datetime "updated_at", :null => false |
|
103 | + t.datetime "updated_at", :null => false |
|
104 | end |
|
104 | end |
|
105 |
|
105 | ||
|
106 | create_table "problems", :force => true do |t| |
|
106 | create_table "problems", :force => true do |t| |
|
107 | t.string "name", :limit => 30 |
|
107 | t.string "name", :limit => 30 |
|
108 | t.string "full_name" |
|
108 | t.string "full_name" |
|
109 | t.integer "full_score" |
|
109 | t.integer "full_score" |
@@ -139,13 +139,13 | |||||
|
139 | end |
|
139 | end |
|
140 |
|
140 | ||
|
141 | add_index "roles_users", ["user_id"], :name => "index_roles_users_on_user_id" |
|
141 | add_index "roles_users", ["user_id"], :name => "index_roles_users_on_user_id" |
|
142 |
|
142 | ||
|
143 | create_table "sessions", :force => true do |t| |
|
143 | create_table "sessions", :force => true do |t| |
|
144 | t.string "session_id" |
|
144 | t.string "session_id" |
|
145 | - t.text "data" |
|
145 | + t.text "data", :limit => 16777215 |
|
146 | t.datetime "updated_at" |
|
146 | t.datetime "updated_at" |
|
147 | end |
|
147 | end |
|
148 |
|
148 | ||
|
149 | add_index "sessions", ["session_id"], :name => "index_sessions_on_session_id" |
|
149 | add_index "sessions", ["session_id"], :name => "index_sessions_on_session_id" |
|
150 | add_index "sessions", ["updated_at"], :name => "index_sessions_on_updated_at" |
|
150 | add_index "sessions", ["updated_at"], :name => "index_sessions_on_updated_at" |
|
151 |
|
151 | ||
@@ -160,25 +160,22 | |||||
|
160 | end |
|
160 | end |
|
161 |
|
161 | ||
|
162 | create_table "submissions", :force => true do |t| |
|
162 | create_table "submissions", :force => true do |t| |
|
163 | t.integer "user_id" |
|
163 | t.integer "user_id" |
|
164 | t.integer "problem_id" |
|
164 | t.integer "problem_id" |
|
165 | t.integer "language_id" |
|
165 | t.integer "language_id" |
|
166 | - t.text "source" |
|
166 | + t.text "source", :limit => 16777215 |
|
167 | t.binary "binary" |
|
167 | t.binary "binary" |
|
168 | t.datetime "submitted_at" |
|
168 | t.datetime "submitted_at" |
|
169 | t.datetime "compiled_at" |
|
169 | t.datetime "compiled_at" |
|
170 | - t.text "compiler_message" |
|
170 | + t.text "compiler_message", :limit => 16777215 |
|
171 | t.datetime "graded_at" |
|
171 | t.datetime "graded_at" |
|
172 | t.integer "points" |
|
172 | t.integer "points" |
|
173 | - t.text "grader_comment" |
|
173 | + t.text "grader_comment", :limit => 16777215 |
|
174 | t.integer "number" |
|
174 | t.integer "number" |
|
175 | t.string "source_filename" |
|
175 | t.string "source_filename" |
|
176 | - t.float "max_runtime" |
|
||
|
177 | - t.integer "peak_memory" |
|
||
|
178 | - t.integer "effective_code_length" |
|
||
|
179 | end |
|
176 | end |
|
180 |
|
177 | ||
|
181 | add_index "submissions", ["user_id", "problem_id", "number"], :name => "index_submissions_on_user_id_and_problem_id_and_number", :unique => true |
|
178 | add_index "submissions", ["user_id", "problem_id", "number"], :name => "index_submissions_on_user_id_and_problem_id_and_number", :unique => true |
|
182 | add_index "submissions", ["user_id", "problem_id"], :name => "index_submissions_on_user_id_and_problem_id" |
|
179 | add_index "submissions", ["user_id", "problem_id"], :name => "index_submissions_on_user_id_and_problem_id" |
|
183 |
|
180 | ||
|
184 | create_table "tasks", :force => true do |t| |
|
181 | create_table "tasks", :force => true do |t| |
@@ -187,33 +184,33 | |||||
|
187 | t.integer "status" |
|
184 | t.integer "status" |
|
188 | t.datetime "updated_at" |
|
185 | t.datetime "updated_at" |
|
189 | end |
|
186 | end |
|
190 |
|
187 | ||
|
191 | create_table "test_pairs", :force => true do |t| |
|
188 | create_table "test_pairs", :force => true do |t| |
|
192 | t.integer "problem_id" |
|
189 | t.integer "problem_id" |
|
193 |
- t.text "input", :limit => |
|
190 | + t.text "input", :limit => 2147483647 |
|
194 |
- t.text "solution", :limit => |
|
191 | + t.text "solution", :limit => 2147483647 |
|
195 | - t.datetime "created_at", :null => false |
|
192 | + t.datetime "created_at", :null => false |
|
196 | - t.datetime "updated_at", :null => false |
|
193 | + t.datetime "updated_at", :null => false |
|
197 | end |
|
194 | end |
|
198 |
|
195 | ||
|
199 | create_table "test_requests", :force => true do |t| |
|
196 | create_table "test_requests", :force => true do |t| |
|
200 | t.integer "user_id" |
|
197 | t.integer "user_id" |
|
201 | t.integer "problem_id" |
|
198 | t.integer "problem_id" |
|
202 | t.integer "submission_id" |
|
199 | t.integer "submission_id" |
|
203 | t.string "input_file_name" |
|
200 | t.string "input_file_name" |
|
204 | t.string "output_file_name" |
|
201 | t.string "output_file_name" |
|
205 | t.string "running_stat" |
|
202 | t.string "running_stat" |
|
206 | t.integer "status" |
|
203 | t.integer "status" |
|
207 | - t.datetime "updated_at", :null => false |
|
204 | + t.datetime "updated_at", :null => false |
|
208 | t.datetime "submitted_at" |
|
205 | t.datetime "submitted_at" |
|
209 | t.datetime "compiled_at" |
|
206 | t.datetime "compiled_at" |
|
210 | - t.text "compiler_message" |
|
207 | + t.text "compiler_message", :limit => 16777215 |
|
211 | t.datetime "graded_at" |
|
208 | t.datetime "graded_at" |
|
212 | t.string "grader_comment" |
|
209 | t.string "grader_comment" |
|
213 | - t.datetime "created_at", :null => false |
|
210 | + t.datetime "created_at", :null => false |
|
214 | t.float "running_time" |
|
211 | t.float "running_time" |
|
215 | t.string "exit_status" |
|
212 | t.string "exit_status" |
|
216 | t.integer "memory_usage" |
|
213 | t.integer "memory_usage" |
|
217 | end |
|
214 | end |
|
218 |
|
215 | ||
|
219 | add_index "test_requests", ["user_id", "problem_id"], :name => "index_test_requests_on_user_id_and_problem_id" |
|
216 | add_index "test_requests", ["user_id", "problem_id"], :name => "index_test_requests_on_user_id_and_problem_id" |
You need to be logged in to leave comments.
Login now