From bf178e6647cc61b38cec807a2205427b3f4445b7 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Fri, 31 May 2019 16:52:56 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/zip_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/zip_service.rb b/app/services/zip_service.rb index 8864999d..ef71063e 100644 --- a/app/services/zip_service.rb +++ b/app/services/zip_service.rb @@ -52,7 +52,7 @@ module ZipService members = exercise.course.members exercise_users.each_with_index do |exercise_user, index| member = members.where(:user_id => exercise_user.user_id).first - group_name = member.try(:course_group_id).to_i == 0 ? '未分班' : member.course_group.name + group_name = member.try(:course_group_id).to_i == 0 ? '未分班' : member.course_group.try(:name) # export_file_name = "#{group_name}-#{exercise.course_id}-#{exercise.exercise_name}-#{exercise_user.user.user_extensions.student_id}-#{exercise_user.user.show_real_name}" + ".pdf" export_file_name = "#{exercise.course_id}-#{index+1}" + ".pdf" out_file = export_user_exercise(exercise, exercise_user, export_file_name)