Simon-Initiative / course-digest

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

[FEATURE] Support Materials element #56

Closed darrensiegel closed 2 years ago

darrensiegel commented 2 years ago

This PR adds support to migrate <materials> element, which is used typically to display two things side-by-side. It migrates materials to a table that is configured to not show it's borders (which Torus doesn't yet support, but will). It handles both orientations that materials DTD element supports: "horizontal" and "vertical")

I found and fixed two other issues:

  1. If a page contained more than one reference to the same image, only one of the references were properly being updated with the new full URL.
  2. Some page content was leading to generation of <td> elements which contained a block element surrounded by two "text" elements that simply contained a single space. This wasn't breaking anything, as once ingested into Torus these spaces turn into paragraphs. But it was adding unnecesary whitespace. This specific case is now identified and the extra spaces are removed.