dev_forum
SylorHuang 6 years ago
parent 7be1a7901c
commit 684084cc63

@ -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

@ -19,7 +19,7 @@
</div>
<div class="mbt20 bgc">
<div class="ex-scores pd10 text-gray fs13">
<p class="clearfix width100">
<p class="clearfix width100 inline-block">
<span class="pull-left">
<% if @exercise_single_ques_count > 0 %>
<span class="mr15">单选题<span class="mlr5"><%= @exercise_single_ques_count %></span>题,

@ -19,7 +19,7 @@
</div>
<div class="mbt20 bgc">
<div class="ex-scores pd10 text-gray fs13">
<p class="clearfix width100">
<p class="clearfix width100 inline-block">
<span class="pull-left">
<% if @exercise_single_ques_count > 0 %>
<span class="mr15">单选题<span class="mlr5"><%= @exercise_single_ques_count %></span>题,

Loading…
Cancel
Save