![]() refs LF-380 flag=none Test plan - Set up a course with several kinds of links to other Canvas assets (files, media files, wiki pages, discussion topics, etc) - Run an import from an existing Canvas export package - Run a course copy - Run a BP course copy - Verify links look correct after the migration Change-Id: Ic7c9eff96ce0e6f75963ea2ec9d8c20929cc1bc2 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/320567 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: James Logan <james.logan@instructure.com> Reviewed-by: Paul Gray <paul.gray@instructure.com> Product-Review: Paul Gray <paul.gray@instructure.com> Product-Review: James Logan <james.logan@instructure.com> QA-Review: James Logan <james.logan@instructure.com> QA-Review: Paul Gray <paul.gray@instructure.com> Build-Review: Andrea Cirulli <andrea.cirulli@instructure.com> |
||
---|---|---|
.. | ||
lib | ||
spec | ||
Gemfile | ||
Gemfile.lock | ||
README.md | ||
canvas_link_migrator.gemspec | ||
test.sh |
README.md
CanvasLinkMigration
CanvasLinkMigration handles importing links to other course content (ie Assignments, Quizzes, Content Pages etc, that are created by the RichContentService using Canvas APIs) exported from Canvas.
Usage
Create a CanvasLinkMigrator::ImportedHtmlConvert using an asset_id_mapping (Get the asset_id_mapping from Canvas API after a migration) and then pass in the html_string data to be imported.
converter = CanvasLinkMigrator::ImportedHtmlConvert.new(asset_id_mapping)
converter.convert_and_replace(html_string)
Use convert and resolve_content_links! separately if desired