From b9118a0212514fce47d9212d25caf7ac1dd85442 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 26 Nov 2014 15:41:13 +0800 Subject: [PATCH] =?UTF-8?q?#1612=20=E4=BF=AE=E6=94=B9=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=E5=AD=A6=E7=94=9F=E4=BD=9C=E4=B8=9A=E4=B8=BA=E5=AD=A6=E5=8F=B7?= =?UTF-8?q?=5F=E5=AD=A6=E7=94=9F=E5=A7=93=E5=90=8D=5F=E4=BD=9C=E5=93=81?= =?UTF-8?q?=E5=90=8D=E7=A7=B0.rar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/zipdown_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/zipdown_controller.rb b/app/controllers/zipdown_controller.rb index 6cbe0dd95..cee26ae32 100644 --- a/app/controllers/zipdown_controller.rb +++ b/app/controllers/zipdown_controller.rb @@ -44,7 +44,7 @@ class ZipdownController < ApplicationController if homework != nil unless homework.attachments.empty? zipfile = zip_homework_by_user homework - send_file zipfile, :filename => homework.name+".zip", :type => detect_content_type(zipfile) if(zipfile) + send_file zipfile, :filename => homework.user.user_extensions.student_id + "_" + homework.user.lastname + homework.user.firstname + "_" + homework.name+".zip", :type => detect_content_type(zipfile) if(zipfile) else render file: 'public/no_file_found.html' end