Simon-Initiative / course-digest

Tool to produce a summary or digest of OLI course package contents
MIT License
2 stars 0 forks source link

[BUGFIX] rewrite basepath param to webContentBundle path [MER-2531] #197

Closed andersweinstein closed 1 year ago

andersweinstein commented 1 year ago

Code was inserted to ignore the superactivity basepath parameter ("asset") when rewriting URLs because it specifies a directory, not a media file, and its inclusion was causing errors because the file could not be read for md5 calculation. However, superactivity script code may use this parameter to form asset URLs at runtime so it needs to be rewritten.

Because a superactivity using a basepath parameter can only work if the webContentBundle option is used, this code change works by passing the basepath reference through as any other media file reference, but changing the flatten code path (used when no webContentBundle) to ignore directories so that no error results (it winds up recorded as a missing file). Going through the webContentBundle code path rewrites the basepath URL same as it does for files.

Used by captivate superactivity in conflict_u course.