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.
|
module SubjectsHelper
|
|
|
|
# 实训路径的发布状态
|
|
def publish_status subject, is_manager, user
|
|
status = -1
|
|
if is_manager
|
|
status = 0 if subject.status == 0 && subject.shixuns_count > 0
|
|
status = 1 if subject.status == 1
|
|
status = 2 if subject.status == 2 && user.admin?
|
|
end
|
|
status
|
|
end
|
|
end
|