Class: Course::Assessment::Submission::StatisticsDownloadJob

Inherits:
ApplicationJob
  • Object
show all
Includes:
TrackableJob
Defined in:
app/jobs/course/assessment/submission/statistics_download_job.rb

Instance Attribute Summary

Attributes included from TrackableJob

#job

Instance Method Summary collapse

Methods included from TrackableJob

#initialize, #job_id=, #perform, #rescue_tracked, #wait

Instance Method Details

#perform_tracked(current_user, submission_ids) ⇒ Object (protected)

Performs the download service.

Parameters:

  • current_user (User)

    The user downloading the statistics.

  • submission_ids (Array<Integer>)

    the id of submissions to download statistics for


12
13
14
15
16
# File 'app/jobs/course/assessment/submission/statistics_download_job.rb', line 12

def perform_tracked(current_user, submission_ids)
  file_path = Course::Assessment::Submission::StatisticsDownloadService.
              download(current_user, submission_ids)
  redirect_to SendFile.send_file(file_path)
end