重新评测最后一关通过的时候显示通过所有关
This commit is contained in:
parent
78a67570c7
commit
d3602d9251
|
|
@ -200,7 +200,11 @@ class GamesController < ApplicationController
|
|||
else # 重新评测
|
||||
if params[:resubmit] == resubmit_identifier # 本次重新评测结果已经返回并存入数据库
|
||||
game_status = (@game.retry_status == 2 ? 2 : 0) # retry_status 2:成功 1: 失败
|
||||
had_done = 0
|
||||
if game_status == 2 && had_done == 1 # 重新评测如果评测成功
|
||||
had_done =1
|
||||
else
|
||||
had_done = 0
|
||||
end
|
||||
else
|
||||
# game_status 在前端有行为判断,2表示通关;0表示失败;1表示评测中的中间状态
|
||||
game_status = 1
|
||||
|
|
|
|||
Loading…
Reference in New Issue