dev_forum
SylorHuang 6 years ago
parent 6e36cc24ab
commit 28c641510c

@ -1334,7 +1334,7 @@ class ExercisesController < ApplicationController
#导出空白试卷 #导出空白试卷
def export_exercise 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" 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" stylesheets = "#{Rails.root}/app/templates/exercise_export/exercise_export.css"
render pdf: 'exercise_export/blank_exercise', filename: filename, stylesheets: stylesheets render pdf: 'exercise_export/blank_exercise', filename: filename, stylesheets: stylesheets

@ -156,7 +156,7 @@ p{
position: absolute; position: absolute;
display: inline-block; display: inline-block;
bottom: 6px; bottom: 6px;
/*left: 1px;*/ left: 1px;
} }
.line-line { .line-line {

Loading…
Cancel
Save