Module: Submittable

Included in:
Exercise
Defined in:
app/models/concerns/submittable/submittable.rb

Instance Method Summary collapse

Instance Method Details

#find_assignment_and_submit!(user, submission) ⇒ Object



6
7
8
9
10
# File 'app/models/concerns/submittable/submittable.rb', line 6

def find_assignment_and_submit!(user, submission)
  assignment = assignment_for user
  results = user.run_submission! submission, assignment, evaluation_class.new
  [assignment, results]
end

#submit!(user, submission) ⇒ Object



2
3
4
# File 'app/models/concerns/submittable/submittable.rb', line 2

def submit!(user, submission)
  find_assignment_and_submit!(user, submission).last
end