default to looking for existing tools on cc import

test plan:
* have a common cartridge package with an LTI tool
* set up an LTI tool on the account-level that
 matches the url/settings of the course tool to be imported
* import the package into a course
* it should not create a new course-level tool but
 use the account-level tool instead

closes #CNVS-38453

Change-Id: Ic54f462f120026460d07619fba3546fdc65fc516
Reviewed-on: https://gerrit.instructure.com/123525
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
This commit is contained in:
James Williams 2017-08-22 10:35:16 -06:00
parent c66233494b
commit 086a3f7bbe
1 changed files with 1 additions and 0 deletions

View File

@ -404,6 +404,7 @@ class ContentMigration < ActiveRecord::Base
if !self.migration_settings.has_key?(:overwrite_quizzes)
self.migration_settings[:overwrite_quizzes] = for_course_copy? || for_master_course_import? || (self.migration_type && self.migration_type == 'canvas_cartridge_importer')
end
self.migration_settings.reverse_merge!(:prefer_existing_tools => true) if self.migration_type == 'common_cartridge_importer' # default to true
check_quiz_id_prepender
end