From 33cc969d880a4dd797136bb21b2ad37d501e5b77 Mon Sep 17 00:00:00 2001 From: SylorHuang Date: Sat, 6 Jul 2019 17:55:44 +0800 Subject: [PATCH] fixbug --- app/controllers/exercises_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/exercises_controller.rb b/app/controllers/exercises_controller.rb index 9de91ca0e..cc7756ca2 100644 --- a/app/controllers/exercises_controller.rb +++ b/app/controllers/exercises_controller.rb @@ -1294,7 +1294,7 @@ class ExercisesController < ApplicationController get_export_users(@exercise,@course,@export_ex_users) exercise_export_name = "#{current_user.real_name}_#{@course.name}_#{@exercise.exercise_name}" ex_xlsx = render_to_string handlers: [:axlsx], formats: [:xlsx], template: "exercises/exercise_lists.xlsx.axlsx", locals: {table_columns:@table_columns,exercise_users:@user_columns} - zip_file = Tempfile.new(["#{exercise_export_name}","xlsx"],"/home/tmp") + zip_file = Tempfile.new(exercise_export_name,"/home/tmp") zip_file.write(ex_xlsx) zip_file.close # render json{:status => 0,"file_name":"#{exercise_export_name}"}