Class: Course::Assessment::Submission::AutoGradingJob

Inherits:
ApplicationJob
  • Object
show all
Includes:
TrackableJob
Defined in:
app/jobs/course/assessment/submission/auto_grading_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(submission) ⇒ Object (protected)

Performs the auto grading.

Parameters:


12
13
14
15
16
17
18
19
# File 'app/jobs/course/assessment/submission/auto_grading_job.rb', line 12

def perform_tracked(submission)
  instance = Course.unscoped { submission.assessment.course.instance }
  ActsAsTenant.with_tenant(instance) do
    Course::Assessment::Submission::AutoGradingService.grade(submission)
    redirect_to(edit_course_assessment_submission_path(submission.assessment.course,
                                                       submission.assessment, submission))
  end
end