From 935386be882de923edea65e745a0eb371bfd9f3a Mon Sep 17 00:00:00 2001 From: Ethan Vizitei Date: Sat, 19 Dec 2020 10:41:37 -0600 Subject: [PATCH] remove unused code closes FOO-1373 flag=none TEST PLAN: 1) index quizzes on a public course with no user and the course has engine_selected/user_id in settings 2) no 500 happens on quiz_engine_selection helper Change-Id: Idbe57981a285602b66f952c6611c12ea16119b18 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/255658 Reviewed-by: Cody Cutrer Tested-by: Service Cloud Jenkins QA-Review: Cody Cutrer Product-Review: Cody Cutrer --- app/controllers/quizzes/quizzes_controller.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/app/controllers/quizzes/quizzes_controller.rb b/app/controllers/quizzes/quizzes_controller.rb index 6850bc9d06fcf..a95ffa6e75017 100644 --- a/app/controllers/quizzes/quizzes_controller.rb +++ b/app/controllers/quizzes/quizzes_controller.rb @@ -1110,7 +1110,6 @@ def scoped_quizzes def quiz_engine_selection selection = nil if @context.is_a?(Course) && @context.settings.dig(:engine_selected, :user_id) - user_id = @current_user.id selection_obj = @context.settings.dig(:engine_selected, :user_id) if selection_obj[:expiration] > Time.zone.today selection = selection_obj[:newquizzes_engine_selected]