mumuki/mumuki-domain

View on GitHub
app/models/concerns/submittable/submittable.rb

Summary

Maintainability
A
0 mins
Test Coverage
module Submittable
  def submit!(user, submission)
    find_assignment_and_submit!(user, submission).last
  end

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