Merge branch 'dev_local' of https://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into dev_local

dev_local
daiao 6 years ago
commit acce5bbacc

@ -9,7 +9,7 @@ unless RUBY_PLATFORM =~ /w32/
gem 'wkhtmltopdf-binary'
elsif RUBY_PLATFORM =~ /linux/
gem "rmagick", "~> 2.13.1" ## centos yum install ImageMagick-devel
gem 'pdfkit'
gem 'pdfkit', "~> 0.8.4.1"
gem 'wkhtmltopdf-binary'
gem 'rqrcode', '~> 0.10.1'
gem 'rqrcode_png'

@ -188,6 +188,7 @@ module ZipService
# file_name = "#{exercise.course_id}-#{exercise.exercise_name}-#{exercise_user.user.user_extensions.student_id}-#{exercise_user.user.show_real_name}" + ".pdf"
# file_name = "#{Time.now.strftime("%Y%m%d%H%M%S").to_s}-#{exercise.course_id}-#{exercise.id}-#{exercise_user.user.user_extensions.student_id}" + ".pdf"
file_name.gsub!(" ", "-")
file_name = filename_for_content_disposition(file_name)
kit.to_file("#{OUTPUT_FOLDER}/#{file_name}")
out_file = "#{OUTPUT_FOLDER}/#{file_name}"
out_file
@ -200,6 +201,10 @@ module ZipService
# file_name = "#{homework.course_id}-#{homework.name}-#{student_work.user.user_extensions.student_id}-#{student_work.user.show_real_name}" + ".pdf"
# file_name = "#{Time.now.strftime("%Y%m%d%H%M%S").to_s}-#{homework.course_id}-#{homework.id}-#{student_work.user.user_extensions.student_id}" + ".pdf"
file_name.gsub!(" ", "-")
Rails.logger.info("######################before_dispos_file_name: #{file_name}")
file_name = filename_for_content_disposition(file_name)
Rails.logger.info("######################after_dispos_file_name: #{file_name}")
kit.to_file("#{OUTPUT_FOLDER}/#{file_name}")
out_file = "#{OUTPUT_FOLDER}/#{file_name}"
out_file

@ -1103,7 +1103,9 @@ RedmineApp::Application.routes.draw do ## oauth相关
collection do
match 'shixuns'
match 'subjects'
match 'create_shixun_homework', :via => [:get,:post]
match 'create_subject_homework', :via => [:get,:post]
post 'publish_shixun_homework'
post 'next_step'
post 'programing_test'

Loading…
Cancel
Save