|
|
@ -103,6 +103,10 @@ module StudentWorksHelper
|
|
|
|
# 对结果进行排序
|
|
|
|
# 对结果进行排序
|
|
|
|
efficiency_list =
|
|
|
|
efficiency_list =
|
|
|
|
results.sort {|x, y| x[:efficiency] <=> y[:efficiency]}.each_with_index.map do |result, index|
|
|
|
|
results.sort {|x, y| x[:efficiency] <=> y[:efficiency]}.each_with_index.map do |result, index|
|
|
|
|
|
|
|
|
if result[:user_id] == work.user.id
|
|
|
|
|
|
|
|
myself_eff = [index+1, result[:efficiency]]
|
|
|
|
|
|
|
|
myself_object = [result[:consume_time], result[:eff_score], result[:round_size]]
|
|
|
|
|
|
|
|
end
|
|
|
|
[index + 1, result[:efficiency], result[:user_id]]
|
|
|
|
[index + 1, result[:efficiency], result[:user_id]]
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|