身份信息报错

dev_forum
daiao 6 years ago
parent 0648d7a7b9
commit dbbd7e9ae4

@ -967,7 +967,7 @@ class GamesController < ApplicationController
def user_next_game(shixun, challenge, game, identity)
next_game = game.next_of_current_game(shixun.id, game.myshixun_id, challenge.position)
# 实训允许跳关 、 当前关卡已经通关、 用户是已认证的老师以上权限的人,允许跳关
if shixun.task_pass || game.status == 2 || identity >= User::EDU_CERTIFICATION_TEACHER
if shixun.task_pass || game.status == 2 || identity <= User::EDU_CERTIFICATION_TEACHER
next_game
else
nil

@ -5,7 +5,7 @@ module MyshixunsHelper
# task_pass: 实训是否允许跳关
def get_game_identifier task_pass, game, game_identity
# 允许跳关、 关卡已经开启、 用户是已认证老师以上的身份
if task_pass || game.status != 3 || game_identity >= User::EDU_CERTIFICATION_TEACHER
if task_pass || game.status != 3 || game_identity <= User::EDU_CERTIFICATION_TEACHER
game.identifier
else
nil

Loading…
Cancel
Save