|
|
|
@ -657,7 +657,8 @@ class GamesController < ApplicationController
|
|
|
|
|
|
|
|
|
|
# 高性能取上一关、下一关
|
|
|
|
|
prev_game = @game.prev_of_current_game(@shixun.id, @game.myshixun_id, game_challenge.position)
|
|
|
|
|
next_game = @game.next_of_current_game(@shixun.id, @game.myshixun_id, game_challenge.position) if had_passed
|
|
|
|
|
next_game = @game.next_game(@shixun.id, @game.myshixun_id, game_challenge.position) if had_passed
|
|
|
|
|
next_game.update_column(:status, 0) if next_game.present? && next_game.status == 3
|
|
|
|
|
|
|
|
|
|
# 高性能取上一关、下一关
|
|
|
|
|
#prev_game = Game.prev_identifier(@shixun.id, @game.myshixun_id, game_challenge.position)
|
|
|
|
@ -670,7 +671,7 @@ class GamesController < ApplicationController
|
|
|
|
|
choose_correct_num: choose_correct_num,
|
|
|
|
|
test_sets: test_sets,
|
|
|
|
|
prev_game: prev_game,
|
|
|
|
|
next_game: next_game}
|
|
|
|
|
next_game: next_game&.identifier}
|
|
|
|
|
rescue Exception => e
|
|
|
|
|
uid_logger("choose build failed #{e.message}")
|
|
|
|
|
@result = [status: -1, contents: "#{e.message}"]
|
|
|
|
|