Description:
update
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r684:11ce8d963587 - - 2 files changed: 29 inserted, 28 deleted
@@ -111,12 +111,13 | |||
|
111 | 111 | |
|
112 | 112 | def stat |
|
113 | 113 | @user = User.find(params[:id]) |
|
114 | 114 | @submission = Submission.joins(:problem).where(user_id: params[:id]) |
|
115 | 115 | @submission = @submission.where('problems.available = true') unless current_user.admin? |
|
116 | 116 | |
|
117 | + | |
|
117 | 118 | range = 120 |
|
118 | 119 | @histogram = { data: Array.new(range,0), summary: {} } |
|
119 | 120 | @summary = {count: 0, solve: 0, attempt: 0} |
|
120 | 121 | problem = Hash.new(0) |
|
121 | 122 | |
|
122 | 123 | @submission.find_each do |sub| |
@@ -12,18 +12,18 | |||
|
12 | 12 | # It's strongly recommended that you check this file into your version control system. |
|
13 | 13 | |
|
14 | 14 | ActiveRecord::Schema.define(version: 20170427070345) do |
|
15 | 15 | |
|
16 | 16 | create_table "announcements", force: :cascade do |t| |
|
17 | 17 | t.string "author", limit: 255 |
|
18 |
- t.text "body", limit: |
|
|
18 | + t.text "body", limit: 16777215 | |
|
19 | 19 | t.boolean "published" |
|
20 | - t.datetime "created_at", null: false | |
|
21 | - t.datetime "updated_at", null: false | |
|
22 | - t.boolean "frontpage", default: false | |
|
23 | - t.boolean "contest_only", default: false | |
|
20 | + t.datetime "created_at", null: false | |
|
21 | + t.datetime "updated_at", null: false | |
|
22 | + t.boolean "frontpage", default: false | |
|
23 | + t.boolean "contest_only", default: false | |
|
24 | 24 | t.string "title", limit: 255 |
|
25 | 25 | t.string "notes", limit: 255 |
|
26 | 26 | end |
|
27 | 27 | |
|
28 | 28 | create_table "contests", force: :cascade do |t| |
|
29 | 29 | t.string "title", limit: 255 |
@@ -47,25 +47,25 | |||
|
47 | 47 | t.string "name", limit: 255 |
|
48 | 48 | t.datetime "created_at", null: false |
|
49 | 49 | t.datetime "updated_at", null: false |
|
50 | 50 | end |
|
51 | 51 | |
|
52 | 52 | create_table "descriptions", force: :cascade do |t| |
|
53 |
- t.text "body", limit: |
|
|
53 | + t.text "body", limit: 16777215 | |
|
54 | 54 | t.boolean "markdowned" |
|
55 | - t.datetime "created_at", null: false | |
|
56 | - t.datetime "updated_at", null: false | |
|
55 | + t.datetime "created_at", null: false | |
|
56 | + t.datetime "updated_at", null: false | |
|
57 | 57 | end |
|
58 | 58 | |
|
59 | 59 | create_table "grader_configurations", force: :cascade do |t| |
|
60 | 60 | t.string "key", limit: 255 |
|
61 | 61 | t.string "value_type", limit: 255 |
|
62 | 62 | t.string "value", limit: 255 |
|
63 | - t.datetime "created_at", null: false | |
|
64 | - t.datetime "updated_at", null: false | |
|
65 |
- t.text "description", limit: |
|
|
63 | + t.datetime "created_at", null: false | |
|
64 | + t.datetime "updated_at", null: false | |
|
65 | + t.text "description", limit: 16777215 | |
|
66 | 66 | end |
|
67 | 67 | |
|
68 | 68 | create_table "grader_processes", force: :cascade do |t| |
|
69 | 69 | t.string "host", limit: 255 |
|
70 | 70 | t.integer "pid", limit: 4 |
|
71 | 71 | t.string "mode", limit: 255 |
@@ -104,16 +104,16 | |||
|
104 | 104 | end |
|
105 | 105 | |
|
106 | 106 | create_table "messages", force: :cascade do |t| |
|
107 | 107 | t.integer "sender_id", limit: 4 |
|
108 | 108 | t.integer "receiver_id", limit: 4 |
|
109 | 109 | t.integer "replying_message_id", limit: 4 |
|
110 |
- t.text "body", limit: |
|
|
110 | + t.text "body", limit: 16777215 | |
|
111 | 111 | t.boolean "replied" |
|
112 | - t.datetime "created_at", null: false | |
|
113 | - t.datetime "updated_at", null: false | |
|
112 | + t.datetime "created_at", null: false | |
|
113 | + t.datetime "updated_at", null: false | |
|
114 | 114 | end |
|
115 | 115 | |
|
116 | 116 | create_table "problems", force: :cascade do |t| |
|
117 | 117 | t.string "name", limit: 30 |
|
118 | 118 | t.string "full_name", limit: 255 |
|
119 | 119 | t.integer "full_score", limit: 4 |
@@ -150,13 +150,13 | |||
|
150 | 150 | end |
|
151 | 151 | |
|
152 | 152 | add_index "roles_users", ["user_id"], name: "index_roles_users_on_user_id", using: :btree |
|
153 | 153 | |
|
154 | 154 | create_table "sessions", force: :cascade do |t| |
|
155 | 155 | t.string "session_id", limit: 255 |
|
156 |
- t.text "data", limit: |
|
|
156 | + t.text "data", limit: 16777215 | |
|
157 | 157 | t.datetime "updated_at" |
|
158 | 158 | end |
|
159 | 159 | |
|
160 | 160 | add_index "sessions", ["session_id"], name: "index_sessions_on_session_id", using: :btree |
|
161 | 161 | add_index "sessions", ["updated_at"], name: "index_sessions_on_updated_at", using: :btree |
|
162 | 162 | |
@@ -178,20 +178,20 | |||
|
178 | 178 | end |
|
179 | 179 | |
|
180 | 180 | create_table "submissions", force: :cascade do |t| |
|
181 | 181 | t.integer "user_id", limit: 4 |
|
182 | 182 | t.integer "problem_id", limit: 4 |
|
183 | 183 | t.integer "language_id", limit: 4 |
|
184 |
- t.text "source", limit: |
|
|
184 | + t.text "source", limit: 16777215 | |
|
185 | 185 | t.binary "binary", limit: 65535 |
|
186 | 186 | t.datetime "submitted_at" |
|
187 | 187 | t.datetime "compiled_at" |
|
188 |
- t.text "compiler_message", limit: |
|
|
188 | + t.text "compiler_message", limit: 16777215 | |
|
189 | 189 | t.datetime "graded_at" |
|
190 | 190 | t.integer "points", limit: 4 |
|
191 |
- t.text "grader_comment", limit: |
|
|
191 | + t.text "grader_comment", limit: 16777215 | |
|
192 | 192 | t.integer "number", limit: 4 |
|
193 | 193 | t.string "source_filename", limit: 255 |
|
194 | 194 | t.float "max_runtime", limit: 24 |
|
195 | 195 | t.integer "peak_memory", limit: 4 |
|
196 | 196 | t.integer "effective_code_length", limit: 4 |
|
197 | 197 | t.string "ip_address", limit: 255 |
@@ -208,33 +208,33 | |||
|
208 | 208 | end |
|
209 | 209 | |
|
210 | 210 | add_index "tasks", ["submission_id"], name: "index_tasks_on_submission_id", using: :btree |
|
211 | 211 | |
|
212 | 212 | create_table "test_pairs", force: :cascade do |t| |
|
213 | 213 | t.integer "problem_id", limit: 4 |
|
214 |
- t.text "input", limit: |
|
|
215 |
- t.text "solution", limit: |
|
|
216 | - t.datetime "created_at", null: false | |
|
217 | - t.datetime "updated_at", null: false | |
|
214 | + t.text "input", limit: 4294967295 | |
|
215 | + t.text "solution", limit: 4294967295 | |
|
216 | + t.datetime "created_at", null: false | |
|
217 | + t.datetime "updated_at", null: false | |
|
218 | 218 | end |
|
219 | 219 | |
|
220 | 220 | create_table "test_requests", force: :cascade do |t| |
|
221 | 221 | t.integer "user_id", limit: 4 |
|
222 | 222 | t.integer "problem_id", limit: 4 |
|
223 | 223 | t.integer "submission_id", limit: 4 |
|
224 | 224 | t.string "input_file_name", limit: 255 |
|
225 | 225 | t.string "output_file_name", limit: 255 |
|
226 | 226 | t.string "running_stat", limit: 255 |
|
227 | 227 | t.integer "status", limit: 4 |
|
228 | - t.datetime "updated_at", null: false | |
|
228 | + t.datetime "updated_at", null: false | |
|
229 | 229 | t.datetime "submitted_at" |
|
230 | 230 | t.datetime "compiled_at" |
|
231 |
- t.text "compiler_message", limit: |
|
|
231 | + t.text "compiler_message", limit: 16777215 | |
|
232 | 232 | t.datetime "graded_at" |
|
233 | 233 | t.string "grader_comment", limit: 255 |
|
234 | - t.datetime "created_at", null: false | |
|
234 | + t.datetime "created_at", null: false | |
|
235 | 235 | t.float "running_time", limit: 24 |
|
236 | 236 | t.string "exit_status", limit: 255 |
|
237 | 237 | t.integer "memory_usage", limit: 4 |
|
238 | 238 | end |
|
239 | 239 | |
|
240 | 240 | add_index "test_requests", ["user_id", "problem_id"], name: "index_test_requests_on_user_id_and_problem_id", using: :btree |
@@ -243,14 +243,14 | |||
|
243 | 243 | t.integer "problem_id", limit: 4 |
|
244 | 244 | t.integer "num", limit: 4 |
|
245 | 245 | t.integer "group", limit: 4 |
|
246 | 246 | t.integer "score", limit: 4 |
|
247 | 247 | t.text "input", limit: 4294967295 |
|
248 | 248 | t.text "sol", limit: 4294967295 |
|
249 | - t.datetime "created_at" | |
|
250 | - t.datetime "updated_at" | |
|
249 | + t.datetime "created_at", null: false | |
|
250 | + t.datetime "updated_at", null: false | |
|
251 | 251 | end |
|
252 | 252 | |
|
253 | 253 | add_index "testcases", ["problem_id"], name: "index_testcases_on_problem_id", using: :btree |
|
254 | 254 | |
|
255 | 255 | create_table "user_contest_stats", force: :cascade do |t| |
|
256 | 256 | t.integer "user_id", limit: 4 |
@@ -269,15 +269,15 | |||
|
269 | 269 | t.string "email", limit: 255 |
|
270 | 270 | t.integer "site_id", limit: 4 |
|
271 | 271 | t.integer "country_id", limit: 4 |
|
272 | 272 | t.boolean "activated", default: false |
|
273 | 273 | t.datetime "created_at" |
|
274 | 274 | t.datetime "updated_at" |
|
275 | + t.string "section", limit: 255 | |
|
275 | 276 | t.boolean "enabled", default: true |
|
276 | 277 | t.string "remark", limit: 255 |
|
277 | 278 | t.string "last_ip", limit: 255 |
|
278 | - t.string "section", limit: 255 | |
|
279 | 279 | end |
|
280 | 280 | |
|
281 | 281 | add_index "users", ["login"], name: "index_users_on_login", unique: true, using: :btree |
|
282 | 282 | |
|
283 | 283 | end |
You need to be logged in to leave comments.
Login now