|
|
|
@ -184,6 +184,7 @@ module ZipService
|
|
|
|
|
|
|
|
|
|
def export_user_exercise exercise, exercise_user, file_name
|
|
|
|
|
url = Setting.protocol + "://" + Setting.host_name + "/exercise/" + exercise.id.to_s + "/show_student_result?user_id=#{exercise_user.user_id}&pdf=1"
|
|
|
|
|
Rails.logger.info("#########################url: #{url}")
|
|
|
|
|
kit = PDFKit.new(url, :page_size => "A4")
|
|
|
|
|
# kit.to_pdf # inline PDF
|
|
|
|
|
# file_name = "#{exercise.course_id}-#{exercise.exercise_name}-#{exercise_user.user.user_extensions.student_id}-#{exercise_user.user.show_real_name}" + ".pdf"
|
|
|
|
|