From 11ea376bc6a6a75d7c9c6c08c5e343034d13c93e Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Wed, 15 May 2019 10:24:45 +0800 Subject: [PATCH] 1 --- app/controllers/myshixuns_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/myshixuns_controller.rb b/app/controllers/myshixuns_controller.rb index c037618b..3115befa 100755 --- a/app/controllers/myshixuns_controller.rb +++ b/app/controllers/myshixuns_controller.rb @@ -545,7 +545,7 @@ class MyshixunsController < ApplicationController challenge.path.split(";").each do |path| game_passed_code(game.id, path, myshixun.try(:gpid), 1) end - if game.answer_open == 0 && (challenge.shixun.try(:status) > 1) # 如果没有查看答案,则获得该关卡得分 + if game.answer_open && (challenge.shixun.try(:status) > 1) # 如果没有查看答案,则获得该关卡得分 reward_grade(game.user, game.id, 'Game', challenge.score) reward_experience(game.user, game.id, 'Game', challenge.score) game.update_attributes!(:final_score => challenge.score)