|
|
@ -510,7 +510,7 @@ class MyshixunsController < ApplicationController
|
|
|
|
challenge.path.split(";").each do |path|
|
|
|
|
challenge.path.split(";").each do |path|
|
|
|
|
game_passed_code(game.id, path, myshixun.try(:gpid), 1)
|
|
|
|
game_passed_code(game.id, path, myshixun.try(:gpid), 1)
|
|
|
|
end
|
|
|
|
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_grade(game.user, game.id, 'Game', challenge.score)
|
|
|
|
reward_experience(game.user, game.id, 'Game', challenge.score)
|
|
|
|
reward_experience(game.user, game.id, 'Game', challenge.score)
|
|
|
|
game.update_attributes!(:final_score => challenge.score)
|
|
|
|
game.update_attributes!(:final_score => challenge.score)
|
|
|
|