parent
b9ba6da862
commit
1738703bda
@ -1,2 +1,14 @@
|
|||||||
module MyshixunsHelper
|
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
|
end
|
||||||
|
Loading…
Reference in new issue