|
|
|
@ -1335,7 +1335,7 @@ class ExercisesController < ApplicationController
|
|
|
|
|
def export_exercise
|
|
|
|
|
@request_url = request.base_url
|
|
|
|
|
@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"
|
|
|
|
|
filename = "#{@exercise.user.real_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
|
|
|
|
|
end
|
|
|
|
|