|
|
|
@ -524,8 +524,13 @@ class ShixunsController < ApplicationController
|
|
|
|
|
# 如果存在实训,则直接进入实训
|
|
|
|
|
# 如果实训允许跳关,传参params[:challenge_id]跳入具体的关卡
|
|
|
|
|
@current_task =
|
|
|
|
|
if params[:challenge_id] && @shixun.task_pass
|
|
|
|
|
games.where(challenge_id: params[:challenge_id]).take
|
|
|
|
|
if params[:challenge_id]
|
|
|
|
|
game = games.where(challenge_id: params[:challenge_id]).take
|
|
|
|
|
if game.status == 3 && !@shixun.task_pass
|
|
|
|
|
tip_show_exception(-4, "关卡还未开启")
|
|
|
|
|
else
|
|
|
|
|
game
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
current_myshixun.current_task(games)
|
|
|
|
|
end
|
|
|
|
|