Skip to content

instructure/canvas_link_migrator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

rcsehilRajmund Csehil
and
Rajmund Csehil
Mar 5, 2025
dc77ede · Mar 5, 2025

History

44 Commits
Jul 20, 2023
Mar 5, 2025
Mar 5, 2025
Mar 29, 2024
Jul 17, 2023
Mar 29, 2024
Mar 5, 2025
Jun 7, 2024
Jul 20, 2023
Mar 5, 2025
Jul 17, 2023
Jul 17, 2023

Repository files navigation

CanvasLinkMigration

CanvasLinkMigration processes html content from a Canvas export package and allows it to be retranslated into html with links to Canvas course content (ie Assignments, Quizzes, Content Pages etc).

Usage

Create a CanvasLinkMigrator::ImportedHtmlConverter using an asset_id_map (Get the asset_map from the Canvas API after a migration) and then pass in the html_string data to be imported.

First create the ImportedHtmlConverter, and then pass the html string into the converter's convert_exported_html method to get the final html product

If any links cannot be resolved appropriately, a list will be returned to you with the resolved html

converter = CanvasLinkMigrator::ImportedHtmlConverter.new(resource_map: asset_id_map)
new_html, missing_links = converter.convert_exported_html(html_string)

Use convert and resolve_content_links! separately if desired

Developing with Docker:

docker compose run --rm -v $PWD:/usr/src/app app bash
> bundle exec rspec
> gem build canvas_link_migrator.gemspec

About

A ruby gem to migrate html with links to canvas content

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published