diff --git a/app/controllers/zipdown_controller.rb b/app/controllers/zipdown_controller.rb
index a3bee3c95..df354f107 100644
--- a/app/controllers/zipdown_controller.rb
+++ b/app/controllers/zipdown_controller.rb
@@ -16,9 +16,11 @@ class ZipdownController < ApplicationController
end
end
+ #一个作业下所有文件打包下载,只有admin和课程老师有权限
def assort
if params[:obj_class] == "Bid"
bid = Bid.find params[:obj_id]
+ render_403 if User.current.allowed_to?(:as_teacher,bid.courses.first)
file_count = 0
bid.homeworks.map { |homework| file_count += homework.attachments.count}
if file_count > 0
diff --git a/app/views/homework_attach/_homework.html.erb b/app/views/homework_attach/_homework.html.erb
index 2b5c48cd4..fca25e8ee 100644
--- a/app/views/homework_attach/_homework.html.erb
+++ b/app/views/homework_attach/_homework.html.erb
@@ -26,7 +26,7 @@
- <%#= link_to "(#{homework.attachments.count.to_s}个附件)", "javascript:"%>
+ <%= link_to "(#{homework.attachments.count.to_s}个附件)", zipdown_download_user_homework_path(:homework => homework)%>
<% unless is_student_batch_homework %>
diff --git a/public/stylesheets/css.css b/public/stylesheets/css.css
index f311d3100..6c7f533ac 100644
--- a/public/stylesheets/css.css
+++ b/public/stylesheets/css.css
@@ -38,7 +38,7 @@ a:hover.tb_all{ background:#eaeaea; text-decoration:none;}
.pic_head a{ text-align:center; width:42px; overflow:hidden;text-overflow:ellipsis; white-space:nowrap;}
.pic_head img{ border:1px solid #fff;}
.pic_head img:hover{border:1px solid #15bccf;}
-.dis ul li.wname a{ width:360px; font-size:14px; color:#595959; padding:15px 0 0 0px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
+.dis ul li.wname a{ width:260px; font-size:14px; color:#595959; padding:15px 0 0 0px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.dis ul li.wdown a{padding-top:22px; color:#3d7ec2; margin-right:35px;}
.wscore{ padding-top:22px; color:#888888; width:96px;}
.dis ul li.wping{margin-left:12px; }