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.
educoder/app/views/student_works/edit.json.jbuilder

19 lines
736 B

json.partial! "homework_commons/homework_public_navigation", locals: {homework: @homework, course: @course, user: @current_user}
json.work_id @work.id
json.description @work.description
json.attachments @work.attachments do |atta|
json.partial! "attachments/attachment_simple", locals: {attachment: atta, delete: @work.delete_atta(atta)}
end
if @homework.homework_type == "group"
json.min_num @homework.homework_detail_group.try(:min_num)
json.max_num @homework.homework_detail_group.try(:max_num)
json.members @work_members do |member|
json.user_id member.user_id
json.user_name member.user.real_name
json.group_name member.course_group_name
json.student_id member.user.student_id
end
end