diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index 2537c465..0e7af070 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -113,7 +113,7 @@ class StudentWorkController < ApplicationController pass_consume_time += (game.cost_time / 60.0).to_f end all_time += (game.cost_time / 60.0).to_f - user_total_score += game.final_score.to_i < 0 ? 0 : game.challenge.score.to_i + user_total_score += game.final_score.to_i <= 0 ? 0 : game.challenge.score.to_i if myshixun.user_id == @work.user.id @game_user_query << [game.id, game.outputs.first.try(:query_index).to_i] end