You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
436 B
15 lines
436 B
module MyshixunsHelper
|
|
|
|
# 获取tpi的identifier,
|
|
# identity表示用户关卡的身份
|
|
# task_pass: 实训是否允许跳关
|
|
def get_game_identifier task_pass, game, game_identity
|
|
# 允许跳关、 关卡已经开启、 用户是已认证老师以上的身份
|
|
if task_pass || game.status != 3 || game_identity >= User::EDU_CERTIFICATION_TEACHER
|
|
game.identifier
|
|
else
|
|
nil
|
|
end
|
|
end
|
|
end
|