Description:
- change testcase data to longtext by limit size
- fix bug in new submission
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r631:79a5d1c218ba - - 4 files changed: 44 inserted, 38 deleted
@@ -0,0 +1,6 | |||
|
1 | + class ChangeTestcaseSize < ActiveRecord::Migration | |
|
2 | + def change | |
|
3 | + change_column :testcases, :input, :text, :limit => 4294967295 | |
|
4 | + change_column :testcases, :sol, :text, :limit => 4294967295 | |
|
5 | + end | |
|
6 | + end |
@@ -2,11 +2,11 | |||
|
2 | 2 | before_filter :admin_authorization, :only => ['index'] |
|
3 | 3 | |
|
4 | 4 | def edit |
|
5 | - @user = User.find_by_login(params[:id]) | |
|
6 | - unless @user | |
|
7 | - render text: "LOGIN_NOT_FOUND" | |
|
8 | - return | |
|
9 | - end | |
|
5 | + #@user = User.find_by_login(params[:id]) | |
|
6 | + #unless @user | |
|
7 | + # render text: "LOGIN_NOT_FOUND" | |
|
8 | + # return | |
|
9 | + #end | |
|
10 | 10 | |
|
11 | 11 | #hb = HeartBeat.where(user_id: @user.id, ip_address: request.remote_ip).first |
|
12 | 12 | #puts "status = #{params[:status]}" |
@@ -19,7 +19,7 | |||
|
19 | 19 | #else |
|
20 | 20 | # HeartBeat.creae(user_id: @user.id, ip_address: request.remote_ip) |
|
21 | 21 | #end |
|
22 | - HeartBeat.create(user_id: @user.id, ip_address: request.remote_ip, status: params[:status]) | |
|
22 | + #HeartBeat.create(user_id: @user.id, ip_address: request.remote_ip, status: params[:status]) | |
|
23 | 23 | |
|
24 | 24 | render text: (GraderConfiguration['right.heartbeat_response'] || 'OK') |
|
25 | 25 | end |
@@ -28,7 +28,7 | |||
|
28 | 28 | .panel.panel-info |
|
29 | 29 | .panel-heading |
|
30 | 30 | Latest Submission Status |
|
31 | - = link_to "Refresh",get_latest_submission_status_submissions_path(@submission.user,@problem), class: "btn btn-default btn-sm", remote: true | |
|
31 | + = link_to "Refresh",get_latest_submission_status_submissions_path(@submission.user,@problem), class: "btn btn-default btn-sm", remote: true if @submission | |
|
32 | 32 | .panel-body |
|
33 | 33 | - if @submission |
|
34 | 34 | = render :partial => 'submission_short', |
@@ -11,16 +11,16 | |||
|
11 | 11 | # |
|
12 | 12 | # It's strongly recommended that you check this file into your version control system. |
|
13 | 13 | |
|
14 |
- ActiveRecord::Schema.define(version: 201 |
|
|
14 | + ActiveRecord::Schema.define(version: 20170123162543) 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 |
@@ -50,19 +50,19 | |||
|
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| |
@@ -107,10 +107,10 | |||
|
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| |
@@ -152,7 +152,7 | |||
|
152 | 152 | |
|
153 | 153 | create_table "sessions", force: :cascade do |t| |
|
154 | 154 | t.string "session_id", limit: 255 |
|
155 |
- t.text "data", limit: |
|
|
155 | + t.text "data", limit: 16777215 | |
|
156 | 156 | t.datetime "updated_at" |
|
157 | 157 | end |
|
158 | 158 | |
@@ -180,14 +180,14 | |||
|
180 | 180 | t.integer "user_id", limit: 4 |
|
181 | 181 | t.integer "problem_id", limit: 4 |
|
182 | 182 | t.integer "language_id", limit: 4 |
|
183 |
- t.text "source", limit: |
|
|
183 | + t.text "source", limit: 16777215 | |
|
184 | 184 | t.binary "binary", limit: 65535 |
|
185 | 185 | t.datetime "submitted_at" |
|
186 | 186 | t.datetime "compiled_at" |
|
187 |
- t.text "compiler_message", limit: |
|
|
187 | + t.text "compiler_message", limit: 16777215 | |
|
188 | 188 | t.datetime "graded_at" |
|
189 | 189 | t.integer "points", limit: 4 |
|
190 |
- t.text "grader_comment", limit: |
|
|
190 | + t.text "grader_comment", limit: 16777215 | |
|
191 | 191 | t.integer "number", limit: 4 |
|
192 | 192 | t.string "source_filename", limit: 255 |
|
193 | 193 | t.float "max_runtime", limit: 24 |
@@ -208,10 +208,10 | |||
|
208 | 208 | |
|
209 | 209 | create_table "test_pairs", force: :cascade do |t| |
|
210 | 210 | t.integer "problem_id", limit: 4 |
|
211 |
- t.text "input", limit: |
|
|
212 |
- t.text "solution", limit: |
|
|
213 | - t.datetime "created_at", null: false | |
|
214 | - t.datetime "updated_at", null: false | |
|
211 | + t.text "input", limit: 4294967295 | |
|
212 | + t.text "solution", limit: 4294967295 | |
|
213 | + t.datetime "created_at", null: false | |
|
214 | + t.datetime "updated_at", null: false | |
|
215 | 215 | end |
|
216 | 216 | |
|
217 | 217 | create_table "test_requests", force: :cascade do |t| |
@@ -222,13 +222,13 | |||
|
222 | 222 | t.string "output_file_name", limit: 255 |
|
223 | 223 | t.string "running_stat", limit: 255 |
|
224 | 224 | t.integer "status", limit: 4 |
|
225 | - t.datetime "updated_at", null: false | |
|
225 | + t.datetime "updated_at", null: false | |
|
226 | 226 | t.datetime "submitted_at" |
|
227 | 227 | t.datetime "compiled_at" |
|
228 |
- t.text "compiler_message", limit: |
|
|
228 | + t.text "compiler_message", limit: 16777215 | |
|
229 | 229 | t.datetime "graded_at" |
|
230 | 230 | t.string "grader_comment", limit: 255 |
|
231 | - t.datetime "created_at", null: false | |
|
231 | + t.datetime "created_at", null: false | |
|
232 | 232 | t.float "running_time", limit: 24 |
|
233 | 233 | t.string "exit_status", limit: 255 |
|
234 | 234 | t.integer "memory_usage", limit: 4 |
@@ -241,10 +241,10 | |||
|
241 | 241 | t.integer "num", limit: 4 |
|
242 | 242 | t.integer "group", limit: 4 |
|
243 | 243 | t.integer "score", limit: 4 |
|
244 |
- t.text "input", limit: |
|
|
245 |
- t.text "sol", limit: |
|
|
246 | - t.datetime "created_at" | |
|
247 | - t.datetime "updated_at" | |
|
244 | + t.text "input", limit: 4294967295 | |
|
245 | + t.text "sol", limit: 4294967295 | |
|
246 | + t.datetime "created_at", null: false | |
|
247 | + t.datetime "updated_at", null: false | |
|
248 | 248 | end |
|
249 | 249 | |
|
250 | 250 | add_index "testcases", ["problem_id"], name: "index_testcases_on_problem_id", using: :btree |
@@ -269,10 +269,10 | |||
|
269 | 269 | t.boolean "activated", default: false |
|
270 | 270 | t.datetime "created_at" |
|
271 | 271 | t.datetime "updated_at" |
|
272 | + t.string "section", limit: 255 | |
|
272 | 273 | t.boolean "enabled", default: true |
|
273 | 274 | t.string "remark", limit: 255 |
|
274 | 275 | t.string "last_ip", limit: 255 |
|
275 | - t.string "section", limit: 255 | |
|
276 | 276 | end |
|
277 | 277 | |
|
278 | 278 | add_index "users", ["login"], name: "index_users_on_login", unique: true, using: :btree |
You need to be logged in to leave comments.
Login now