Shared scoreboard: extend UI for marathons
This commit is contained in:
@@ -10,7 +10,7 @@ module ContestantsConcern
|
||||
contestant.time_seconds
|
||||
] }
|
||||
elsif contest.ranking_mode == "theorical"
|
||||
contest.contestants.sort_by { |contestant| contestant.completions.map { |completion| completion.projected_time }.sum }
|
||||
contest.contestants.includes([ :completions, :offline ]).sort_by { |contestant| contestant.completions.map { |completion| completion.projected_time }.sum }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -211,7 +211,7 @@ class ContestsController < ApplicationController
|
||||
if params.key?(:autorefresh)
|
||||
@autorefresh = true
|
||||
end
|
||||
@puzzles = @contest.puzzles.where(hidden: false).or(@contest.puzzles.where(hidden: nil)).order(:id)
|
||||
@puzzles = @contest.puzzles.where(hidden: false).or(@contest.puzzles.where(hidden: nil)).includes([ :image_attachment ]).order(:id)
|
||||
@action_path = "/public/#{@contest.friendly_id}"
|
||||
@space = " "
|
||||
render :scoreboard
|
||||
|
||||
Reference in New Issue
Block a user