From 6d944721a86a4b758ada540dc9472233cf704cff Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Sun, 10 Mar 2019 11:35:51 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AD=94=E6=A1=88=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/games_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/games_service.rb b/app/services/games_service.rb index 9bced6df..a418cf8a 100644 --- a/app/services/games_service.rb +++ b/app/services/games_service.rb @@ -233,7 +233,7 @@ class GamesService is_teacher = (current_user.user_extensions.identity == 0) is_certification_teacher = current_user.is_certification_teacher # 这几种情况可以直接查看答案的:实训未发布;当前用户为实训管理员;已经查看过答案;平台认证的老师; - if (@shixun.status < 2 || shixun_manager(@shixun, current_user) || @game.answer_open || is_certification_teacher) + if (@shixun.status < 2 || shixun_manager(@shixun, current_user) || @game.answer_open == 1 || is_certification_teacher) Rails.logger.info("answer#{params[:identifier]}#### user is #{current_user.id}, status is #{@shixun.status}, manager is #{shixun_manager(@shixun, current_user)}, open #{@game.answer_open}, cer #{is_certification_teacher}") if challenge.st == 0 result = challenge.try(:answer)