|
|
@ -1290,7 +1290,7 @@ class ExercisesController < ApplicationController
|
|
|
|
if params[:export].present? && params[:export]
|
|
|
|
if params[:export].present? && params[:export]
|
|
|
|
normal_status(0,"正在下载中")
|
|
|
|
normal_status(0,"正在下载中")
|
|
|
|
else
|
|
|
|
else
|
|
|
|
file = File.open(Rails.root.join('exercise_export/blank_exercise'))
|
|
|
|
file = File.open(Rails.root.join('exercise_export/blank_exercise.html.erb'))
|
|
|
|
html = ERB.new(file.read).result(prepare_binding)
|
|
|
|
html = ERB.new(file.read).result(prepare_binding)
|
|
|
|
|
|
|
|
|
|
|
|
kit = PDFKit.new(html)
|
|
|
|
kit = PDFKit.new(html)
|
|
|
|