dev_course
cxt 6 years ago
parent bfd5c4748a
commit b86b7ac352

@ -434,7 +434,7 @@ class StudentWorksController < ApplicationController
# 用户最大评测次数
if @games
@user_evaluate_count = @games.sum(:evaluate_count)
@user_evaluate_count = @games.pluck(:evaluate_count).sum
@games = @games.includes(:challenge, :game_codes, :outputs)
else
@user_evaluate_count = 0
@ -450,7 +450,7 @@ class StudentWorksController < ApplicationController
@games = @work.myshixun.games.includes(:challenge, :game_codes, :outputs) if @work.myshixun
# 用户最大评测次数
@user_evaluate_count = @games.sum(:evaluate_count) if @games
@user_evaluate_count = @games.pluck(:evaluate_count).sum if @games
# 图形效率图的数据
@echart_data = student_efficiency(@homework, @work)
@myself_eff = @echart_data[:efficiency_list].find { |item| item.last == @user.id }

Loading…
Cancel
Save