|
|
@ -851,7 +851,8 @@ module ExportHelper
|
|
|
|
def make_zip_name(work, file_name="")
|
|
|
|
def make_zip_name(work, file_name="")
|
|
|
|
Rails.logger.info("######################file_name: #{file_name}")
|
|
|
|
Rails.logger.info("######################file_name: #{file_name}")
|
|
|
|
# name = file_name === "" ? "" : (file_name[0, file_name.rindex('.')]+"_")
|
|
|
|
# name = file_name === "" ? "" : (file_name[0, file_name.rindex('.')]+"_")
|
|
|
|
"#{work&.homework_common.course&.user_group_name(work.user_id)}_#{work&.user&.student_id}_#{work&.user&.real_name}_#{Time.now.strftime('%Y%m%d_%H%M%S')}"
|
|
|
|
course = work&.homework_common.course || work&.graduation_task.course
|
|
|
|
|
|
|
|
"#{course&.user_group_name(work.user_id)}_#{work&.user&.student_id}_#{work&.user&.real_name}_#{Time.now.strftime('%Y%m%d_%H%M%S')}"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
def zipping(zip_name_refer, files_paths, output_path, is_attachment=false, not_exist_file=[])
|
|
|
|
def zipping(zip_name_refer, files_paths, output_path, is_attachment=false, not_exist_file=[])
|
|
|
|