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

22 lines
784 B

json.course_id @course.id
json.course_name @course.name
json.category @homework.category_info
json.(@homework, :id, :name, :description, :reference_answer)
if @homework.homework_type == "group"
json.base_on_project @homework.homework_detail_group.try(:base_on_project)
json.min_num @homework.homework_detail_group.try(:min_num)
json.max_num @homework.homework_detail_group.try(:max_num)
json.has_project @homework.has_relate_project
json.has_commit @homework.has_commit_work
end
json.attachments @homework.des_attachments do |atta|
json.partial! "attachments/attachment_simple", locals: {attachment: atta}
end
json.ref_attachments @homework.ref_attachments do |atta|
json.partial! "attachments/attachment_simple", locals: {attachment: atta}
end