|
|
|
@ -220,6 +220,15 @@ class TagsController < ApplicationController
|
|
|
|
|
@tag = ActsAsTaggableOn::Tag.find_by_id(@tag_id)
|
|
|
|
|
@tag.delete unless @tag.nil?
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if @obj && @object_flag == '6' && @obj.container.kind_of?(Course)
|
|
|
|
|
@course = @obj.container
|
|
|
|
|
all_attachments = @course.attachments.select{|attachment| attachment.is_public? ||
|
|
|
|
|
(attachment.container_type == "Course" && User.current.member_of_course?(@course))||
|
|
|
|
|
attachment.author_id == User.current.id
|
|
|
|
|
}
|
|
|
|
|
@tag_list = attachment_tag_list all_attachments
|
|
|
|
|
end
|
|
|
|
|
# end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
@ -263,6 +272,14 @@ class TagsController < ApplicationController
|
|
|
|
|
else
|
|
|
|
|
logger.error "#{__FILE__}:#{__LINE__} ===> #{@obj.errors.try(:full_messages)}"
|
|
|
|
|
end
|
|
|
|
|
if @obj && @obj_flag == '6' && @obj.container.kind_of?(Course)
|
|
|
|
|
@course = @obj.container
|
|
|
|
|
all_attachments = @course.attachments.select{|attachment| attachment.is_public? ||
|
|
|
|
|
(attachment.container_type == "Course" && User.current.member_of_course?(@course))||
|
|
|
|
|
attachment.author_id == User.current.id
|
|
|
|
|
}
|
|
|
|
|
@tag_list = attachment_tag_list all_attachments
|
|
|
|
|
end
|
|
|
|
|
respond_to do |format|
|
|
|
|
|
format.js
|
|
|
|
|
format.html
|
|
|
|
|