Description:
modernize
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r574:6250748f34ac - - 1 file changed: 1 inserted, 1 deleted
@@ -230,25 +230,25 | |||
|
230 | 230 | stat = self.contest_stat |
|
231 | 231 | return ((stat != nil) and (stat.started_at != nil)) |
|
232 | 232 | elsif GraderConfiguration.contest_mode? |
|
233 | 233 | return true if site==nil |
|
234 | 234 | return site.started |
|
235 | 235 | else |
|
236 | 236 | return true |
|
237 | 237 | end |
|
238 | 238 | end |
|
239 | 239 | |
|
240 | 240 | def update_start_time |
|
241 | 241 | stat = self.contest_stat |
|
242 |
- if stat |
|
|
242 | + if (stat.nil?) or (stat.started_at.nil?) | |
|
243 | 243 | stat ||= UserContestStat.new(:user => self) |
|
244 | 244 | stat.started_at = Time.now.gmtime |
|
245 | 245 | stat.save |
|
246 | 246 | end |
|
247 | 247 | end |
|
248 | 248 | |
|
249 | 249 | def problem_in_user_contests?(problem) |
|
250 | 250 | problem_contests = problem.contests.all |
|
251 | 251 | |
|
252 | 252 | if problem_contests.length == 0 # this is public contest |
|
253 | 253 | return true |
|
254 | 254 | end |
You need to be logged in to leave comments.
Login now