From 09801538560b2a88b91736b5745f17cb160499e3 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Mon, 8 Jul 2019 15:42:01 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=89=E6=8B=A9=E9=A2=98=E7=AD=94=E6=A1=88?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/games_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/games_controller.rb b/app/controllers/games_controller.rb index e5106ff59..6ffc7f0ce 100644 --- a/app/controllers/games_controller.rb +++ b/app/controllers/games_controller.rb @@ -903,7 +903,7 @@ class GamesController < ApplicationController end # actual_output为空表示暂时没有评测答题,不允许查看 actual_output = output.try(:actual_output).try(:strip) - has_answer << choose.answer if choose.answer.present? + #has_answer << choose.answer if choose.answer.present? # 标准答案处理,错误的不让用户查看,用-1替代 standard_answer = (actual_output.blank? || !output.try(:result)) ? -1 : choose.standard_answer result = output.try(:result) @@ -914,7 +914,7 @@ class GamesController < ApplicationController @chooses << sin_choose test_sets << sin_test_set end - @has_answer = has_answer.present? + @has_answer = true # 选择题永远都有答案 @choose_test_cases = {:had_submmit => had_submmit, :challenge_chooses_count => challenge_chooses_count, :choose_correct_num => choose_correct_num, :test_sets => test_sets} end