Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
6e38895c3b
|
@ -342,10 +342,15 @@ class CoursesController < ApplicationController
|
|||
|
||||
def export_course_member_excel
|
||||
@all_members = student_homework_score(0,0,0,"desc")
|
||||
filename="#{@course.teacher.lastname.to_s + @course.teacher.firstname.to_s }_#{@course.name}_#{@course.time.to_s + @course.term}#{l(:excel_member_list)}";
|
||||
# 如果是ie11 需要转码
|
||||
if(/rv\:11\.0/.match(request.env["HTTP_USER_AGENT"]) != nil)
|
||||
filename= URI::encode(filename)
|
||||
end
|
||||
respond_to do |format|
|
||||
format.xls {
|
||||
send_data(member_to_xls(@all_members,@course.course_groups), :type => "text/excel;charset=utf-8; header=present",
|
||||
:filename => "#{@course.teacher.lastname.to_s + @course.teacher.firstname.to_s }_#{@course.name}_#{@course.time.to_s + @course.term}#{l(:excel_member_list)}.xls")
|
||||
:filename => "#{filename}.xls")
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue