Remove import_quizzes_next feature flag

closes QUIZ-4547

Test Plan:
 - Enable Quizzes.Next in Canvas
 - Enable Quizzes next for the course.
 - Browse to Courses -> Settings -> Import Course Content
   (/courses/<course_id>/content_migrations)
 - For Content Types 'Common Cartridge 1.x package' and 'QTI.zip file'
 - Import to Quizzes.Next Checkbox and help should be shown, and enabled

 - Disable Quizzes next for the course.
 - Browse to Courses -> Settings -> Import Course Content
   (/courses/<course_id>/content_migrations)
 - For Content Types 'Common Cartridge 1.x package' and 'QTI.zip file'
 - Import to Quizzes.Next Checkbox and help should be shown, but disabled

 - Disable Quizzes next in Canvas
 - Browse to Courses -> Settings -> Import Course Content
   (/courses/<course_id>/content_migrations)
 - For Content Types 'Common Cartridge 1.x package' and 'QTI.zip file'
 - Ensure the Import to Quizzes.Next Checkbox and help are not shown.

Change-Id: Ie04f94684c682db81dac721c7bb11b3d153e7e29
Reviewed-on: https://gerrit.instructure.com/154769
Tested-by: Jenkins
Reviewed-by: Jared Crystal <jcrystal@instructure.com>
QA-Review: David Tan <dtan@instructure.com>
Product-Review: Kevin Dougherty <jdougherty@instructure.com>
This commit is contained in:
Steve Kacsmark 2018-06-21 13:53:56 -05:00
parent ad53f99b2d
commit a664cdb0b2
5 changed files with 1 additions and 16 deletions

View File

@ -173,8 +173,7 @@ class ContentMigrationsController < ApplicationController
js_env(:OLD_END_DATE => datetime_string(@context.conclude_at, :verbose))
js_env(:SHOW_SELECT => @current_user.manageable_courses.count <= 100)
js_env(:CONTENT_MIGRATIONS_EXPIRE_DAYS => ContentMigration.expire_days)
js_env(:QUIZZES_NEXT_CONFIGURED_ROOT => @context.root_account.feature_allowed?(:quizzes_next) &&
@context.root_account.feature_enabled?(:import_to_quizzes_next))
js_env(:QUIZZES_NEXT_CONFIGURED_ROOT => @context.root_account.feature_allowed?(:quizzes_next))
js_env(:QUIZZES_NEXT_ENABLED => @context.feature_enabled?(:quizzes_next) && @context.quiz_lti_tool.present?)
set_tutorial_js_env
end

View File

@ -565,7 +565,6 @@ class ContentMigration < ActiveRecord::Base
def quizzes_next_migration?
context.instance_of?(Course) && root_account &&
root_account.feature_enabled?(:import_to_quizzes_next) &&
migration_settings[:import_quizzes_next]
end

View File

@ -662,14 +662,6 @@ END
is_provisioned
end
},
'import_to_quizzes_next' =>
{
display_name: -> { I18n.t('Quizzes.Next Importing') },
description: -> { I18n.t('Allow importing of QTI and Common Cartridge into Quizzes.Next.') },
applies_to: 'RootAccount',
beta: true,
state: 'allowed'
},
'common_cartridge_page_conversion' => {
display_name: -> { I18n.t('Common Cartridge HTML File to Page Conversion') },
description: -> { I18n.t('If enabled, Common Cartridge importers will convert HTML files into Pages') },

View File

@ -46,7 +46,6 @@ RSpec.describe 'Canvas LMS Live Events', :pact_live_events do
account.settings[:provision] = {'lti' => 'lti url'}
account.lti_context_id = '1'
account.enable_feature!(:quizzes_next)
account.enable_feature!(:import_to_quizzes_next)
account.save!
course_model(uuid: '100006')

View File

@ -608,10 +608,6 @@ describe ContentMigration do
context 'Quizzes.Next CC import' do
before do
allow(@cm.root_account).
to receive(:feature_enabled?).
with(:import_to_quizzes_next).
and_return(true)
allow(@cm.migration_settings).
to receive(:[]).
with(:import_quizzes_next).