diff --git a/app/controllers/games_controller.rb b/app/controllers/games_controller.rb index 335db9cb0..7a213d632 100644 --- a/app/controllers/games_controller.rb +++ b/app/controllers/games_controller.rb @@ -278,7 +278,7 @@ class GamesController < ApplicationController @had_passed_testsests_public_count = had_test.blank? ? 0 : had_test.select{|had_test| had_test.result == true && had_test.is_public == true}.count @final_score = ((@game.answer_open? || shixun.status <= 1) ? 0 : @game.final_score.to_i) error_position = had_test.blank? ? nil : had_test.select{|had_test| had_test.result == false}.last - @latest_output = error_position.try(:out_put).gsub(/\n/, '
').gsub(/\t/, '        ') unless error_position.try(:out_put).blank? + @latest_output = error_position.try(:out_put) unless error_position.try(:out_put).blank? logger.info("@compile_success###################{@compile_success}") @language = game_challenge.shixun.language render :json => {test_sets: total_test_sets,