From d26c4a62ba116110fcf86f8d6db2b5f459aa83ae Mon Sep 17 00:00:00 2001 From: daiao <35855898@qq.com> Date: Mon, 11 Mar 2019 08:43:18 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=9A=E8=BF=87=E5=8D=B4=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E5=BE=97=E5=88=B0=E9=87=91=E5=B8=81=E5=A5=96=E5=8A=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 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 808d2d4f..cf7e6ee9 100644 --- a/app/controllers/myshixuns_controller.rb +++ b/app/controllers/myshixuns_controller.rb @@ -510,7 +510,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 == 1 && (challenge.shixun.try(:status) > 1) # 如果没有查看答案,则获得该关卡得分 + if game.answer_open == 0 && (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)