From 61c285ff10eb25e4d3e3023b421109fbbf00f61f Mon Sep 17 00:00:00 2001 From: yanxd Date: Wed, 16 Apr 2014 15:17:55 +0800 Subject: [PATCH] page access controll with homework.zip --- app/views/bids/_homework_list.html.erb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/bids/_homework_list.html.erb b/app/views/bids/_homework_list.html.erb index 05281fe0f..8f87a6b37 100644 --- a/app/views/bids/_homework_list.html.erb +++ b/app/views/bids/_homework_list.html.erb @@ -14,10 +14,10 @@ <% 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?%>