Description:
added options not to hide passed problems
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r260:a6455c18d017 - - 2 files changed: 5 inserted, 1 deleted
@@ -312,13 +312,12 | |||
|
312 | 312 | else |
|
313 | 313 | timeout = assignment.created_at + TEST_ASSIGNMENT_EXPIRATION_DURATION - Time.new.gmtime |
|
314 | 314 | end |
|
315 | 315 | end |
|
316 | 316 | @submission_timeouts[problem.id] = timeout |
|
317 | 317 | end |
|
318 | - @submission_timeouts.each_pair {|k,v| puts "#{k} => #{v}"} | |
|
319 | 318 | end |
|
320 | 319 | |
|
321 | 320 | def prepare_list_information |
|
322 | 321 | @user = User.find(session[:user_id]) |
|
323 | 322 | |
|
324 | 323 | all_problems = Problem.find_available_problems |
@@ -340,13 +339,17 | |||
|
340 | 339 | @current_problem_id = params[:id].to_i |
|
341 | 340 | else |
|
342 | 341 | @current_problem_id = nil |
|
343 | 342 | end |
|
344 | 343 | end |
|
345 | 344 | |
|
345 | + if (not defined? HIDE_PASSED_TASKS) or HIDE_PASSED_TASKS | |
|
346 | 346 | @problems = all_problems.reject { |problem| passed.has_key? problem.id } |
|
347 | + else | |
|
348 | + @problems = all_problems | |
|
349 | + end | |
|
347 | 350 | |
|
348 | 351 | prepare_timeout_information(@problems) |
|
349 | 352 | |
|
350 | 353 | @prob_submissions = Array.new |
|
351 | 354 | @problems.each do |p| |
|
352 | 355 | if sub_count.has_key? p.id |
You need to be logged in to leave comments.
Login now