From 0eb967126c68ea4448418c19cecffd07885a570a Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 31 May 2019 19:26:40 +0800 Subject: [PATCH] 1 --- app/services/games_service.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/services/games_service.rb b/app/services/games_service.rb index f338a4a5..db78c5dc 100755 --- a/app/services/games_service.rb +++ b/app/services/games_service.rb @@ -21,6 +21,9 @@ class GamesService return{:status => 403} end game_challenge = Challenge.min.find(game.challenge_id) + unless current_user.is_certification_teacher || current_user.admin? + game_challenge.answer = "" + end has_answer = game_challenge.answer.blank? ? false : true game_challenge.answer = nil