|
|
|
@ -1334,7 +1334,7 @@ class ExercisesController < ApplicationController
|
|
|
|
|
|
|
|
|
|
#导出空白试卷
|
|
|
|
|
def export_exercise
|
|
|
|
|
@exercise_questions = @exercise.exercise_questions.order("question_number ASC")
|
|
|
|
|
@exercise_questions = @exercise.exercise_questions.includes(:exercise_choices).order("question_number ASC")
|
|
|
|
|
filename = "#{current_user.real_name}_#{@course.name}_#{@exercise.exercise_name}_#{Time.current.strftime('%Y%m%d%H%M%S')}.pdf"
|
|
|
|
|
stylesheets = "#{Rails.root}/app/templates/exercise_export/exercise_export.css"
|
|
|
|
|
render pdf: 'exercise_export/blank_exercise', filename: filename, stylesheets: stylesheets
|
|
|
|
|