diff --git a/app/services/exercise_user_pdf_service.rb b/app/services/exercise_user_pdf_service.rb index 9b96cd70c..44ee1e769 100644 --- a/app/services/exercise_user_pdf_service.rb +++ b/app/services/exercise_user_pdf_service.rb @@ -3,7 +3,7 @@ class ExerciseUserPdfService include ApplicationHelper include StudentWorksHelper - attr_reader :exercise, :ex_user + attr_reader :exercise, :ex_user, :request_url def initialize(exercise, ex_user,request_url) @exercise = exercise diff --git a/app/services/export_exercises_service.rb b/app/services/export_exercises_service.rb index 0d2d8f3ce..f83323d7e 100644 --- a/app/services/export_exercises_service.rb +++ b/app/services/export_exercises_service.rb @@ -1,9 +1,9 @@ class ExportExercisesService include ExercisesHelper include StudentWorksHelper - attr_reader :exercise, :ex_users + attr_reader :exercise, :ex_users, :request_url - def initialize(exercise, ex_users,request_url) + def initialize(exercise, ex_users, request_url) @exercise = exercise @ex_users = ex_users @request_url = request_url @@ -19,7 +19,7 @@ class ExportExercisesService pdfs = [] Zip::File.open(zip_file.path, Zip::File::CREATE) do |zip| ex_users.each do |ex_user| - export = ExerciseUserPdfService.new(exercise, ex_user,request_url) + export = ExerciseUserPdfService.new(exercise, ex_user,@request_url) pdf = export.ex_pdf pdfs << pdf begin