don't do extra redirect in LDB popup window
fixes #6636 there seems to be a race condition where this redirect will sometimes happen before the LDB notices the params telling it to go into fullscreen lockdown mode. so we just avoid the redirect, which isn't necessary since we didn't make a post request anyway. test plan: in the LDB, go to a quiz that requires the LDB, ensure that it goes fullscreen. Change-Id: Idf94ae56ce5e695f51fe75da9d98611f60164666 Reviewed-on: https://gerrit.instructure.com/7564 Tested-by: Hudson <hudson@instructure.com> Reviewed-by: Zach Pendleton <zachp@instructure.com>
This commit is contained in:
parent
7ccb815b87
commit
28d57eb3c7
|
@ -472,7 +472,13 @@ class QuizzesController < ApplicationController
|
|||
@submission = @quiz.generate_submission(user_code, !!preview)
|
||||
end
|
||||
if quiz_submission_active?
|
||||
redirect_to named_context_url(@context, 'context_quiz_take_url', @quiz.id)
|
||||
if request.get?
|
||||
# currently, the only way to start_quiz! with a get request is to use the LDB
|
||||
take_quiz
|
||||
else
|
||||
# redirect to avoid refresh issues
|
||||
redirect_to named_context_url(@context, 'context_quiz_take_url', @quiz.id)
|
||||
end
|
||||
else
|
||||
flash[:error] = t('errors.no_more_attempts', "You have no quiz attempts left") unless @just_graded
|
||||
redirect_to named_context_url(@context, :context_quiz_url, @quiz)
|
||||
|
|
Loading…
Reference in New Issue