教师有权限删除课程内教辅和学生上传的资源的TAG

This commit is contained in:
cxt 2016-05-05 15:04:37 +08:00
parent 55718f2d44
commit 29c18518e7
1 changed files with 1 additions and 1 deletions

View File

@ -12,7 +12,7 @@
:taggable_id => obj.id, :taggable_type => object_flag %> </span> :taggable_id => obj.id, :taggable_type => object_flag %> </span>
<% end %> <% end %>
<% when '6' %> <% when '6' %>
<% if obj.author_id == User.current.id || User.current.admin?%> <% if obj.author_id == User.current.id || User.current.admin? || (obj.container_type == 'Course' && User.current.allowed_to?(:as_teacher,obj.course)) %>
<% select_tag_name ||= ""%> <% select_tag_name ||= ""%>
<span class='del'> <%= link_to 'x', :controller => "tags", :action => "remove_tag_new", :remote => true, :tag_name => tag, <span class='del'> <%= link_to 'x', :controller => "tags", :action => "remove_tag_new", :remote => true, :tag_name => tag,
:taggable_id => obj.id, :taggable_type => object_flag, :select_tag_name => select_tag_name %> </span> :taggable_id => obj.id, :taggable_type => object_flag, :select_tag_name => select_tag_name %> </span>