dev_forum
cxt 5 years ago
parent 008518e47f
commit 5645883f57

@ -1597,7 +1597,7 @@ class HomeworkCommonsController < ApplicationController
att = attachment.copy att = attachment.copy
att.author_id = homework_bank.user_id att.author_id = homework_bank.user_id
att.copy_from = attachment.id att.copy_from = attachment.id
att.attachtype = attachment.attachtype att.attachtype = attachment.attachtype || 1
homework_bank.attachments << att homework_bank.attachments << att
end end
homework_bank homework_bank

@ -154,7 +154,7 @@ class QuestionBanksController < ApplicationController
att.container_id = nil att.container_id = nil
att.container_type = nil att.container_type = nil
att.author_id = homework.user_id att.author_id = homework.user_id
att.attachtype = attachment.attachtype att.attachtype = attachment.attachtype || 1
# att.attachtype = 1 # att.attachtype = 1
att.copy_from = attachment.id att.copy_from = attachment.id
att.save! att.save!

Loading…
Cancel
Save