instructure / canvas-lms

The open LMS by Instructure, Inc.
https://github.com/instructure/canvas-lms/wiki
GNU Affero General Public License v3.0
5.4k stars 2.42k forks source link

Common Cartridge special path token changed from $IMS-CC-FILEBASE$ to $1EdTech-CC-FILEBASE$ #2376

Open ywarnier opened 1 week ago

ywarnier commented 1 week ago

When IMS Global changed name to 1EdTech, they also changed the name of the "special token" used to substitute root paths for filepaths in the Common Cartridge standard from $IMS-CC-FILEBASE$ to $1EdTech-CC-FILEBASE$. See https://www.imsglobal.org/cc/ccv1p3/imscc_Implementation-v1p3.html#toc-79 (Section 3.4.3.3).

This is confusing, of course, but I couldn't help but notice Canvas still (and only) uses the old syntax here: https://github.com/instructure/canvas-lms/blob/4962f2693ab8c292dc5c986af5bd61611e68a461/lib/cc/importer/standard/converter.rb#L163

This might cause issues when importing from other systems using the new token.

I think it would be good to add support for the new syntax too, for example by changing FILEBASE_REGEX = /\$IMS[-_]CC[-_]FILEBASE\$/ to FILEBASE_REGEX = /\$(?:IMS|1EdTech)[-_]CC[-_]FILEBASE\$/

I'm happy to submit a PR for that, but not being used to contribute to Canvas, I would like to get approval first.