Ensure error is still thrown if lti_parameter is null
This commit is contained in:
@ -323,7 +323,17 @@ class ExercisesController < ApplicationController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def redirect_to_lti_return_path
|
def redirect_to_lti_return_path
|
||||||
begin
|
Raven.extra_context(
|
||||||
|
consumers_id: session[:consumer_id],
|
||||||
|
external_users_id: @submission.user_id,
|
||||||
|
exercises_id: @submission.exercise_id,
|
||||||
|
session: session,
|
||||||
|
submission: @submission,
|
||||||
|
params: params,
|
||||||
|
current_user: current_user,
|
||||||
|
lti_exercise_id: session[:lti_exercise_id]
|
||||||
|
)
|
||||||
|
|
||||||
lti_parameter = LtiParameter.where(consumers_id: session[:consumer_id],
|
lti_parameter = LtiParameter.where(consumers_id: session[:consumer_id],
|
||||||
external_users_id: @submission.user_id,
|
external_users_id: @submission.user_id,
|
||||||
exercises_id: @submission.exercise_id).first
|
exercises_id: @submission.exercise_id).first
|
||||||
@ -336,18 +346,6 @@ class ExercisesController < ApplicationController
|
|||||||
format.html { redirect_to(path) }
|
format.html { redirect_to(path) }
|
||||||
format.json { render(json: {redirect: path}) }
|
format.json { render(json: {redirect: path}) }
|
||||||
end
|
end
|
||||||
rescue StandardError
|
|
||||||
Raven.extra_context(
|
|
||||||
consumers_id: session[:consumer_id],
|
|
||||||
external_users_id: @submission.user_id,
|
|
||||||
exercises_id: @submission.exercise_id,
|
|
||||||
session: session,
|
|
||||||
submission: @submission,
|
|
||||||
params: params,
|
|
||||||
current_user: current_user,
|
|
||||||
lti_exercise_id: session[:lti_exercise_id]
|
|
||||||
)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
private :redirect_to_lti_return_path
|
private :redirect_to_lti_return_path
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user