json.partial! "public_navigation", locals: {course: @course, graduation: @task}

json.(@task, :task_type, :min_num, :max_num, :base_on_project, :status, :cross_comment, :publish_time, :end_time,
     :allow_late, :late_penalty, :late_time, :comment_num, :comment_status, :comment_time, :open_work, :open_score)

json.has_project @task.student_relate_projects
json.has_commit @task.student_commit_works

if @user_course_identity == Course::STUDENT
  json.work_id @task.user_work(@current_user.id).try(:id)
  json.work_status graduation_work_status(@task, @current_user.id, @course)
end

json.graduation_groups @course.graduation_groups do |gra_group|
  json.group_id gra_group.id
  json.group_name gra_group.name
  json.member_count gra_group.course_members.count
  json.select_name @task.task_assign_group(gra_group.id).try(:assign_group).try(:name)
  json.assign_group_id @task.task_assign_group(gra_group.id).try(:assign_graduation_group_id)
end