|
|
|
@ -1493,6 +1493,7 @@ class UsersController < ApplicationController
|
|
|
|
|
attach_copied_obj.container = Course.find(id)
|
|
|
|
|
attach_copied_obj.created_on = Time.now
|
|
|
|
|
attach_copied_obj.author_id = User.current.id
|
|
|
|
|
attach_copied_obj.copy_from = ori.copy_from.nil? ? ori.id : ori.copy_from #发送要添加copy_from
|
|
|
|
|
if attach_copied_obj.attachtype == nil
|
|
|
|
|
attach_copied_obj.attachtype = 4
|
|
|
|
|
end
|
|
|
|
@ -1517,6 +1518,7 @@ class UsersController < ApplicationController
|
|
|
|
|
attach_copied_obj.container = Course.find(id)
|
|
|
|
|
attach_copied_obj.created_on = Time.now
|
|
|
|
|
attach_copied_obj.author_id = User.current.id
|
|
|
|
|
attach_copied_obj.copy_from = ori.copy_from.nil? ? ori.id : ori.copy_from #发送要添加copy_from
|
|
|
|
|
if attach_copied_obj.attachtype == nil
|
|
|
|
|
attach_copied_obj.attachtype = 4
|
|
|
|
|
end
|
|
|
|
@ -1563,6 +1565,7 @@ class UsersController < ApplicationController
|
|
|
|
|
attach_copied_obj.container = Project.find(project_id)
|
|
|
|
|
attach_copied_obj.created_on = Time.now
|
|
|
|
|
attach_copied_obj.author_id = User.current.id
|
|
|
|
|
attach_copied_obj.copy_from = ori.copy_from.nil? ? ori.id : ori.copy_from #发送要添加copy_from
|
|
|
|
|
if attach_copied_obj.attachtype == nil
|
|
|
|
|
attach_copied_obj.attachtype = 1
|
|
|
|
|
end
|
|
|
|
@ -1586,6 +1589,7 @@ class UsersController < ApplicationController
|
|
|
|
|
attach_copied_obj.container = Project.find(project_id)
|
|
|
|
|
attach_copied_obj.created_on = Time.now
|
|
|
|
|
attach_copied_obj.author_id = User.current.id
|
|
|
|
|
attach_copied_obj.copy_from = ori.copy_from.nil? ? ori.id : ori.copy_from #发送要添加copy_from
|
|
|
|
|
if attach_copied_obj.attachtype == nil
|
|
|
|
|
attach_copied_obj.attachtype = 1
|
|
|
|
|
end
|
|
|
|
@ -1628,6 +1632,7 @@ class UsersController < ApplicationController
|
|
|
|
|
attach_copied_obj.container = OrgSubfield.find(subfield_id)
|
|
|
|
|
attach_copied_obj.created_on = Time.now
|
|
|
|
|
attach_copied_obj.author_id = User.current.id
|
|
|
|
|
attach_copied_obj.copy_from = ori.copy_from.nil? ? ori.id : ori.copy_from #发送要添加copy_from
|
|
|
|
|
if attach_copied_obj.attachtype == nil
|
|
|
|
|
attach_copied_obj.attachtype = 1
|
|
|
|
|
end
|
|
|
|
@ -1649,6 +1654,7 @@ class UsersController < ApplicationController
|
|
|
|
|
attach_copied_obj.container = OrgSubfield.find(subfield_id)
|
|
|
|
|
attach_copied_obj.created_on = Time.now
|
|
|
|
|
attach_copied_obj.author_id = User.current.id
|
|
|
|
|
attach_copied_obj.copy_from = ori.copy_from.nil? ? ori.id : ori.copy_from #发送要添加copy_from
|
|
|
|
|
if attach_copied_obj.attachtype == nil
|
|
|
|
|
attach_copied_obj.attachtype = 1
|
|
|
|
|
end
|
|
|
|
|