json.(@subject, :id, :name, :description, :learning_notes, :stages_count, :stage_shixuns_count, :shixuns_count, :excellent)

json.challenge_choose_count @subject.subject_challenge_choose_count
json.challenges_count @subject.subject_challenge_count
json.subject_score @subject.all_score
json.member_count @subject.member_count

json.allow_delete (@subject.status != 2 && @is_creator) || @user.admin?
json.publish_status publish_status(@subject, @is_manager, @user, @shixuns)
json.allow_statistics @is_manager
json.allow_send @user.logged?
json.allow_visit @subject.status > 1 || @is_manager
json.allow_add_member @is_manager
json.is_creator @is_creator

if @subject.excellent
  json.courses @courses do |course|
    json.course_id course.id
    json.first_category_url module_url(course.none_hidden_course_modules.first, course)
    json.start_date course.start_date
    json.end_date course.end_date
    json.student_count course.students.count
    json.course_identity @user.course_identity(course)
    json.course_status subject_course_status course
  end
end


json.members @members do |member|
  json.partial! 'subject_member', locals: { user: member.user }
  json.role member.role
end

# 技能标签
json.tags @tags do |tag|
  unless tag.blank?
    json.tag_name tag
    json.status @user_tags.include?(tag)
  end
end

# 我的进展
json.progress do
  json.my_score @subject.my_subject_score
  json.all_score @subject.all_score
  json.learned @subject.my_subject_progress
  json.time  @subject.my_consume_time
end