page access controll with homework.zip

This commit is contained in:
yanxd 2014-04-16 15:17:55 +08:00
parent d137e78f19
commit 61c285ff10
1 changed files with 4 additions and 4 deletions

View File

@ -14,10 +14,10 @@
</div>
<% end %>
<% display_id = im_watching_student_id? @bid%>
<%= link_to "作业打包下载", zipdown_assort_path(obj_class: @bid.class, obj_id: @bid), remote: false, class: "button_submit button_submit_font_white", style: "margin: 5px 10px;display: inline-block;" if( User.current.admin? ||
!(User.current.roles_for_project(@bid.courses.first).map(&:id) &
([7,9, 10])).empty?
) && (true || Rails.env.development?) %>
<%= link_to "作业打包下载", zipdown_assort_path(obj_class: @bid.class, obj_id: @bid), remote: false, class: "button_submit button_submit_font_white", style: "margin: 5px 10px;display: inline-block;" if(
User.current.admin? ||
!(User.current.roles_for_project(@bid.courses.first).map(&:id) & ([7,9])).empty? ) ||
(Rails.env.development?) %>
<% @homework_list.each do |homework|%>
<% if homework.attachments.any?%>
<table width="660px" border="0" align="center">