json.partial! "graduation_tasks/public_navigation", locals: {course: @course, graduation: @task}
json.task_type @task.task_type
json.work_id @work.id
json.description @work.description
json.user_name @task_user.real_name
json.max_num @task.max_num
json.min_num @task.min_num

json.attachments @work.attachments do |atta|
  json.partial! "attachments/attachment_simple", locals: {attachment: atta, delete: @work.delete_atta(atta)}
end

if @task.task_type == 2
  json.is_leader_work @work.user_id == @commit_user_id
  json.members @work_members do |member|
    json.user_id member.user_id
    json.is_leader_work @work.user_id == @commit_user_id
    json.user_name member.user.real_name
    json.group_name member.course_group_name
    json.student_id member.user.student_id
    json.is_leader member.user_id == @commit_user_id
  end
end