Description:
merge
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r466:b99651140f6d - - 3 files changed: 2 inserted, 2 deleted
@@ -109,24 +109,25 | |||
|
109 | 109 | |
|
110 | 110 | @by_lang = {} #aggregrate by language |
|
111 | 111 | |
|
112 | 112 | range =65 |
|
113 | 113 | @histogram = { data: Array.new(range,0), summary: {} } |
|
114 | 114 | @summary = {count: 0, solve: 0, attempt: 0} |
|
115 | 115 | user = Hash.new(0) |
|
116 | 116 | Submission.where(problem_id: @problem.id).find_each do |sub| |
|
117 | 117 | #histogram |
|
118 | 118 | d = (DateTime.now.in_time_zone - sub.submitted_at) / 24 / 60 / 60 |
|
119 | 119 | @histogram[:data][d.to_i] += 1 if d < range |
|
120 | 120 | |
|
121 | + next unless sub.points | |
|
121 | 122 | @summary[:count] += 1 |
|
122 | 123 | user[sub.user_id] = [user[sub.user_id], (sub.points >= @problem.full_score) ? 1 : 0].max |
|
123 | 124 | |
|
124 | 125 | lang = Language.find_by_id(sub.language_id) |
|
125 | 126 | next unless lang |
|
126 | 127 | next unless sub.points >= @problem.full_score |
|
127 | 128 | |
|
128 | 129 | #initialize |
|
129 | 130 | unless @by_lang.has_key?(lang.pretty_name) |
|
130 | 131 | @by_lang[lang.pretty_name] = { |
|
131 | 132 | runtime: { avail: false, value: 2**30-1 }, |
|
132 | 133 | memory: { avail: false, value: 2**30-1 }, |
@@ -230,18 +230,17 | |||
|
230 | 230 | create_table "users", :force => true do |t| |
|
231 | 231 | t.string "login", :limit => 50 |
|
232 | 232 | t.string "full_name" |
|
233 | 233 | t.string "hashed_password" |
|
234 | 234 | t.string "salt", :limit => 5 |
|
235 | 235 | t.string "alias" |
|
236 | 236 | t.string "email" |
|
237 | 237 | t.integer "site_id" |
|
238 | 238 | t.integer "country_id" |
|
239 | 239 | t.boolean "activated", :default => false |
|
240 | 240 | t.datetime "created_at" |
|
241 | 241 | t.datetime "updated_at" |
|
242 | - t.string "section" | |
|
243 | 242 | end |
|
244 | 243 | |
|
245 | 244 | add_index "users", ["login"], :name => "index_users_on_login", :unique => true |
|
246 | 245 | |
|
247 | 246 | end |
@@ -91,25 +91,25 | |||
|
91 | 91 | { |
|
92 | 92 | :key => 'system.user_setting_enabled', |
|
93 | 93 | :value_type => 'boolean', |
|
94 | 94 | :default_value => 'true', |
|
95 | 95 | :description => 'If this option is true, users can change their settings' |
|
96 | 96 | }, |
|
97 | 97 | |
|
98 | 98 | { |
|
99 | 99 | :key => 'system.user_setting_enabled', |
|
100 | 100 | :value_type => 'boolean', |
|
101 | 101 | :default_value => 'true', |
|
102 | 102 | :description => 'If this option is true, users can change their settings' |
|
103 | - } | |
|
103 | + }, | |
|
104 | 104 | |
|
105 | 105 | # If Configuration['contest.test_request.early_timeout'] is true |
|
106 | 106 | # the user will not be able to use test request at 30 minutes |
|
107 | 107 | # before the contest ends. |
|
108 | 108 | { |
|
109 | 109 | :key => 'contest.test_request.early_timeout', |
|
110 | 110 | :value_type => 'boolean', |
|
111 | 111 | :default_value => 'false' |
|
112 | 112 | }, |
|
113 | 113 | |
|
114 | 114 | { |
|
115 | 115 | :key => 'system.multicontests', |
You need to be logged in to leave comments.
Login now