|
|
|
@ -270,7 +270,8 @@ class GamesController < ApplicationController
|
|
|
|
|
if @game.status == 2
|
|
|
|
|
@game.update_attributes!(:answer_open => @answer.level)
|
|
|
|
|
else
|
|
|
|
|
@game.update_attributes!(:answer_open => @answer.level, :answer_deduction => deduct_score)
|
|
|
|
|
answer_deduction = challenge.challenge_answers.where("level <= #{@answer.level}").sum(:score)
|
|
|
|
|
@game.update_attributes!(:answer_open => @answer.level, :answer_deduction => answer_deduction)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
rescue Exception => e
|
|
|
|
|