代码分析报告

dev_hjm
daiao 6 years ago
parent 11f97819b3
commit f04fe525de

@ -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

Loading…
Cancel
Save