Brightspace / update-course-action

Updates the course content of a Brightspace course
Apache License 2.0
2 stars 1 forks source link

Internal linking results in NotFound #31

Closed khorwood closed 4 years ago

khorwood commented 4 years ago

Internally linked files result in a NotFound error. May need to consider rewriting internal links to point at their content topics.

khorwood commented 4 years ago

This would add some complexity. We'd need to resolve the dependency graph and generate quicklinks to the internally linked content to update the HTML links before uploading the content files. @PeteLloyd I'm wondering if it makes more sense, now that everything is in one course, to remove the internal links?

PeteLloyd commented 4 years ago

We could, but that seems like an annoying limitation. It's often useful to refer to other topics; I guess they don't have to be links, but... :( I'm guessing the problem is that content topics are normally referred to based on their topic id, and not their file path?

khorwood commented 4 years ago

That's the issue yes. We could use the file path for the non-module links, but it won't progress the navigation the way a quicklink would.

khorwood commented 4 years ago

More thinking is leading me to a second pass which re-links the content based on the content structure. Two passes limits complexity by solving the chicken-egg problem at the expense of a little more processing. We'd need to update the current flow to return a collection of the items we created in the LMS for quicker lookups, and add functions to wrap the quicklink creation APIs.

Pass A = Create all the things
Pass B = If any HTML links are relative, find the corresponding quicklink and update the file

I can take a stab at this tomorrow.

PeteLloyd commented 4 years ago

Sounds good to me. I'd consider making pass A just stub anything that doesn't exist while building a map of manifest object -> topic id. Then pass B can process and update the html.