Class: Course::Conditional::ConditionalSatisfiabilityEvaluationJob

Inherits:
ApplicationJob
  • Object
show all
Includes:
TrackableJob
Defined in:
app/jobs/course/conditional/conditional_satisfiability_evaluation_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(course_user, redirect_to_path = nil) ⇒ Object (protected)

Performs conditional satisfiability evaluation for the given course user.

Parameters:

  • redirect_to_path (String|nil) (defaults to: nil)

    The path to be redirected after the conditionals are evaluated.

  • course_user (CourseUser)

    The course user with the conditionals to be evaluated.


12
13
14
15
16
17
18
19
# File 'app/jobs/course/conditional/conditional_satisfiability_evaluation_job.rb', line 12

def perform_tracked(course_user, redirect_to_path = nil)
  instance = Course.unscoped { course_user.course.instance }
  ActsAsTenant.with_tenant(instance) do
    Course::Conditional::ConditionalSatisfiabilityEvaluationService.evaluate(course_user)
  end

  redirect_to redirect_to_path
end