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] Preserve text alongside block content in stems MER-1744 #123

Closed andersweinstein closed 1 year ago

andersweinstein commented 1 year ago

Fix for MER-1744. Changed to preserve non-empty "loose" text pieces found alongside block elements in question stems, as occurs frequently in Chemistry, wrapping them in paragraph tags. Tested by ingesting Chem1 locally and comparing a sample of assessment questions to version on Tokomak. Looks to work without breaking any existing questions.

In one case, seeing the newly ingested text exposed a different issue -- subscript tag causes a paragraph break rather than being converted to inline style, badly breaking up CO2. [Update: now corrected]

andersweinstein commented 1 year ago

Correction, the problem of breaking up styled text is not a separate issue. Loose styled text in stems get parsed into multiple successive text pieces. Therefore, when building a stem, consecutive text pieces need to be collected and wrapped together within a single paragraph, rather than each wrapped in its own paragraph. Working on this.

andersweinstein commented 1 year ago

Latest commit fixes the issue about breaking up styled text.