|
|
@ -533,7 +533,7 @@ class GamesService
|
|
|
|
|
|
|
|
|
|
|
|
# 更新评测次数
|
|
|
|
# 更新评测次数
|
|
|
|
game.update_column(:evaluate_count, (game.evaluate_count.to_i + 1))
|
|
|
|
game.update_column(:evaluate_count, (game.evaluate_count.to_i + 1))
|
|
|
|
shixun.increment!(:evaluate_count)
|
|
|
|
# shixun.increment!(:evaluate_count)
|
|
|
|
# 清空代码评测信息
|
|
|
|
# 清空代码评测信息
|
|
|
|
msg = game.run_code_message
|
|
|
|
msg = game.run_code_message
|
|
|
|
msg.update_attributes(:status => 0, :message => nil) if msg.present?
|
|
|
|
msg.update_attributes(:status => 0, :message => nil) if msg.present?
|
|
|
@ -694,7 +694,7 @@ class GamesService
|
|
|
|
:evaluate_count]).find_by_identifier(params[:identifier])
|
|
|
|
:evaluate_count]).find_by_identifier(params[:identifier])
|
|
|
|
# 更新评测次数
|
|
|
|
# 更新评测次数
|
|
|
|
game.update_column(:evaluate_count, (game.evaluate_count.to_i + 1))
|
|
|
|
game.update_column(:evaluate_count, (game.evaluate_count.to_i + 1))
|
|
|
|
game.challenge.shixun.increment!(:evaluate_count)
|
|
|
|
# game.challenge.shixun.increment!(:evaluate_count)
|
|
|
|
|
|
|
|
|
|
|
|
# 选择题如果通关了,则不让再评测
|
|
|
|
# 选择题如果通关了,则不让再评测
|
|
|
|
if game.status == 2
|
|
|
|
if game.status == 2
|
|
|
|