remove redundant course import code
this code turns out to have been redundant ever since this was merged in 2018: https://gerrit.instructure.com/c/canvas-lms/+/158759/3/app/models/importers/wiki_page_importer.rb#111 so it can be removed and the course copy wiki specs still pass test plan: - course copy specs pass flag=none refs CANVAS-N7CV Change-Id: If694a0b1975c266cccfa663798ee33fce750b6a4 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/353069 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Mysti Lilla <mysti@instructure.com> QA-Review: Jeremy Stanley <jeremy@instructure.com> Product-Review: Jeremy Stanley <jeremy@instructure.com>
This commit is contained in:
parent
80f9c01c71
commit
cda236aaa5
|
@ -189,16 +189,6 @@ module Importers
|
|||
Importers::BlueprintSettingsImporter.process_migration(data, migration)
|
||||
end
|
||||
|
||||
# be very explicit about draft state courses, but be liberal toward legacy courses
|
||||
if course.wiki.has_no_front_page &&
|
||||
migration.for_course_copy? &&
|
||||
!migration.for_master_course_import? &&
|
||||
(source = migration.source_course || Course.where(id: migration.migration_settings[:source_course_id]).first)
|
||||
mig_id = migration.content_export.create_key(source.wiki.front_page)
|
||||
if (new_front_page = course.wiki_pages.where(migration_id: mig_id).first)
|
||||
course.wiki.set_front_page_url!(new_front_page.url)
|
||||
end
|
||||
end
|
||||
front_page = course.wiki.front_page
|
||||
course.wiki.unset_front_page! if front_page.nil? || front_page.new_record?
|
||||
|
||||
|
|
|
@ -1362,6 +1362,7 @@ describe ContentMigration do
|
|||
Timecop.travel(1.minute.from_now) do
|
||||
expect { run_course_copy }.not_to change(ContentExport, :count)
|
||||
expect { JSON.parse(@cm.reload.exported_attachment.open) }.not_to raise_error
|
||||
|
||||
expect(@copy_to.wiki_pages.where(title: "one")).to exist
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue