Revert "Remove import_quizzes_next feature flag"
This reverts commit a664cdb0b2
.
Fixes QUIZ-4871
Change-Id: I7bb26a6cf03f4442f384bd40d4ed612b060012bb
Reviewed-on: https://gerrit.instructure.com/155719
Tested-by: Jenkins
QA-Review: Robin Kuss <rkuss@instructure.com>
Reviewed-by: Han Yan <hyan@instructure.com>
Product-Review: Gentry Beckmann <gbeckmann@instructure.com>
This commit is contained in:
parent
fd18cc316b
commit
4d3dc28d7d
|
@ -173,7 +173,8 @@ 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))
|
||||
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_ENABLED => @context.feature_enabled?(:quizzes_next) && @context.quiz_lti_tool.present?)
|
||||
set_tutorial_js_env
|
||||
end
|
||||
|
|
|
@ -565,6 +565,7 @@ 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
|
||||
|
||||
|
|
|
@ -662,6 +662,14 @@ 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') },
|
||||
|
|
|
@ -46,6 +46,7 @@ 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')
|
||||
|
|
|
@ -608,6 +608,10 @@ 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).
|
||||
|
|
Loading…
Reference in New Issue