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/show.json.jbuilder

29 lines
1.2 KiB

json.partial! "homework_commons/homework_public_navigation", locals: {homework: @homework, course: @course, user: @current_user}
json.(@work, :description, :commit_time, :update_time)
json.is_evaluation @is_evaluation
json.author_name @is_evaluation ? "匿名" : @work.user.real_name
json.is_leader_work @work.user_id == @work.commit_user_id if @homework.homework_type == "group"
json.is_author @is_author
json.commit_user_name @is_evaluation ? "匿名" : @work.commit_user.try(:real_name)
json.update_user_name @is_evaluation ? "匿名" : @work.update_user.try(:real_name)
json.update_atta @homework.late_duration && @is_author
json.attachments @attachments do |atta|
json.partial! "attachments/attachment_simple", locals: {attachment: atta, delete: false, }
end
unless @is_evaluation
if @homework.homework_type == "group" && @homework.homework_detail_group.base_on_project
json.project_info project_info @work, @current_user, @user_course_identity
end
json.work_members @work_members.each do |work|
json.user_name work.user.real_name
json.user_login work.user.login
json.work_id work.id
json.is_leader work.user_id == work.commit_user_id
end
end