Description:
Merge pull request #23 from nattee/master
some bug fix
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r768:f22301d0d070 - - 7 files changed: 12 inserted, 5 deleted
@@ -0,0 +1,5 | |||||
|
|
1 | + class ChangeSubmissionSourceSize < ActiveRecord::Migration | ||
|
|
2 | + def change | ||
|
|
3 | + change_column :submissions, :source, :text, :limit => 1.megabyte | ||
|
|
4 | + end | ||
|
|
5 | + end |
@@ -187,7 +187,7 | |||||
|
187 | end |
|
187 | end |
|
188 |
|
188 | ||
|
189 | def do_manage |
|
189 | def do_manage |
|
190 | - if params.has_key? 'change_date_added' |
|
190 | + if params.has_key? 'change_date_added' and params[:date_added].strip.empty? == false |
|
191 | change_date_added |
|
191 | change_date_added |
|
192 | elsif params.has_key? 'add_to_contest' |
|
192 | elsif params.has_key? 'add_to_contest' |
|
193 | add_to_contest |
|
193 | add_to_contest |
@@ -43,7 +43,7 | |||||
|
43 | end |
|
43 | end |
|
44 |
|
44 | ||
|
45 | #users |
|
45 | #users |
|
46 | - @users = if params[:user] == "all" then |
|
46 | + @users = if params[:users] == "all" then |
|
47 | User.includes(:contests).includes(:contest_stat) |
|
47 | User.includes(:contests).includes(:contest_stat) |
|
48 | else |
|
48 | else |
|
49 | User.includes(:contests).includes(:contest_stat).where(enabled: true) |
|
49 | User.includes(:contests).includes(:contest_stat).where(enabled: true) |
@@ -8,7 +8,7 | |||||
|
8 | before_validation :assign_language |
|
8 | before_validation :assign_language |
|
9 |
|
9 | ||
|
10 | validates_presence_of :source |
|
10 | validates_presence_of :source |
|
11 | - validates_length_of :source, :maximum => 100_000, :allow_blank => true, :message => 'too long' |
|
11 | + validates_length_of :source, :maximum => 100_000, :allow_blank => true, :message => 'code too long, the limit is 100,000 bytes' |
|
12 | validates_length_of :source, :minimum => 1, :allow_blank => true, :message => 'too short' |
|
12 | validates_length_of :source, :minimum => 1, :allow_blank => true, :message => 'too short' |
|
13 | validate :must_have_valid_problem |
|
13 | validate :must_have_valid_problem |
|
14 | validate :must_specify_language |
|
14 | validate :must_specify_language |
@@ -110,6 +110,7 | |||||
|
110 | $('.input-group.date').datetimepicker({ |
|
110 | $('.input-group.date').datetimepicker({ |
|
111 | format: 'DD/MMM/YYYY', |
|
111 | format: 'DD/MMM/YYYY', |
|
112 | showTodayButton: true, |
|
112 | showTodayButton: true, |
|
|
113 | + locale: 'en', | ||
|
113 | widgetPositioning: {horizontal: 'auto', vertical: 'bottom'}, |
|
114 | widgetPositioning: {horizontal: 'auto', vertical: 'bottom'}, |
|
114 |
|
115 | ||
|
115 | }); |
|
116 | }); |
@@ -31,6 +31,7 | |||||
|
31 | :javascript |
|
31 | :javascript |
|
32 | $('.input-group.date').datetimepicker({ |
|
32 | $('.input-group.date').datetimepicker({ |
|
33 | format: 'DD/MMM/YYYY HH:mm', |
|
33 | format: 'DD/MMM/YYYY HH:mm', |
|
|
34 | + locale: 'en', | ||
|
34 | showTodayButton: true, |
|
35 | showTodayButton: true, |
|
35 | }); |
|
36 | }); |
|
36 |
|
37 |
@@ -11,7 +11,7 | |||||
|
11 | # |
|
11 | # |
|
12 | # It's strongly recommended that you check this file into your version control system. |
|
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: 20180612102327) do |
|
15 |
|
15 | ||
|
16 | create_table "announcements", force: :cascade do |t| |
|
16 | create_table "announcements", force: :cascade do |t| |
|
17 | t.string "author", limit: 255 |
|
17 | t.string "author", limit: 255 |
@@ -209,7 +209,7 | |||||
|
209 | t.integer "user_id", limit: 4 |
|
209 | t.integer "user_id", limit: 4 |
|
210 | t.integer "problem_id", limit: 4 |
|
210 | t.integer "problem_id", limit: 4 |
|
211 | t.integer "language_id", limit: 4 |
|
211 | t.integer "language_id", limit: 4 |
|
212 |
- t.text "source", limit: |
|
212 | + t.text "source", limit: 16777215 |
|
213 | t.binary "binary", limit: 65535 |
|
213 | t.binary "binary", limit: 65535 |
|
214 | t.datetime "submitted_at" |
|
214 | t.datetime "submitted_at" |
|
215 | t.datetime "compiled_at" |
|
215 | t.datetime "compiled_at" |
You need to be logged in to leave comments.
Login now