Class: ExerciseSolutionsController

Inherits:
AjaxController show all
Includes:
Mumuki::Laboratory::Controllers::NestedInExercise, Mumuki::Laboratory::Controllers::ResultsRendering
Defined in:
app/controllers/exercise_solutions_controller.rb

Instance Method Summary collapse

Methods included from Mumuki::Laboratory::Controllers::ResultsRendering

#guide_finished_by_solution?, #render_results_html, #render_results_json, #render_results_title_html, #set_guide_previously_done!

Methods included from Mumuki::Laboratory::Controllers::NestedInExercise

#set_exercise!

Methods inherited from ApplicationController

#login_button, #redirect_to_main_organization!, #should_choose_organization?, #should_redirect_to_main_organization?, #validate_accessible!, #validate_used_here!

Methods included from Mumuki::Laboratory::Controllers::DynamicErrors

#forbidden, #gone, #internal_server_error, #not_found, #unauthorized

Methods included from Mumuki::Laboratory::Controllers::Messages

#has_messages?, #messages_count

Methods included from Mumuki::Laboratory::Controllers::Authorization

#authorization_slug, #authorize_if_private!, #from_sessions?

Methods included from Mumuki::Laboratory::Controllers::CurrentOrganization

#organization_name, #set_current_organization!, #visit_organization!

Instance Method Details

#createObject



8
9
10
11
# File 'app/controllers/exercise_solutions_controller.rb', line 8

def create
  assignment = @exercise.submit_solution!(current_user, solution_params)
  render_results_json assignment, status: assignment.status
end