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.
30 lines
726 B
30 lines
726 B
# 实训创建者信息
|
|
json.creator do
|
|
json.partial! 'users/user', locals: { user: shixun.owner }
|
|
end
|
|
|
|
# 相关路径
|
|
json.paths do
|
|
json.partial! 'subjects/subject', locals: {subjects: shixun.relation_path}
|
|
end
|
|
|
|
# 推荐实训
|
|
json.recommands do
|
|
json.partial! 'shap_shixun', locals: { shixuns: shixun.relation_path.size > 0 ? recommend_shixun(shixun) : [] }
|
|
end
|
|
|
|
if shixun.status > 1
|
|
json.complete_count @myshixun&.passed_count
|
|
json.challenge_count @shixun.challenges_count
|
|
end
|
|
|
|
# 技能标签
|
|
json.tags do
|
|
json.array! @shixun_tags do |tag|
|
|
json.tag_name tag
|
|
json.status @user_tags.include?(tag)
|
|
end
|
|
end
|
|
json.tag_count @shixun_tags.size
|
|
json.user_tag_count @user_tags.size
|