# 公共数据
json.partial! "show_navigation", locals: {course: @course, graduation: @graduation_topic}
json.graduation_topic_name @graduation_topic.name
json.status_name @graduation_topic.status_name
json.back_url course_graduation_topics_path(@course)
json.edit_url edit_course_graduation_topic_path(@course, graduation_topic_id: @graduation_topic)
json.users_count @users_count
json.course_identity @current_user.course_identity(@course)
json.user_selected_topic @graduation_topic.user_status(current_user.id)
json.group_list @course.teacher_group(current_user.id)
json.user_selected @user_selected

# 列表数据
json.users_list do
  json.array! @student_graduation_topics do |student|
    json.id student.id
    json.student_name student.name
    json.student_id student.student_id
    json.class_group_name student.class_group_name
    json.selected_time student.selected_time
    json.result student.status_name
    if @user_course_identity < Course::STUDENT
      if student.status == 0 || student.status == 1
        json.refuse_operate_api refuse_student_topic_course_graduation_topic_path(@course)
      end
      if student.status == 0
        json.accept_operate_api accept_student_topic_course_graduation_topic_path(@course)
      end
    end
  end
end


