Skip to content

[ENHANCEMENT] [MER-5771][MER-5772][MER-5773][MER-5774][MER-5775] Handle various quirks found in PIMA French XML#299

Merged
rgachuhi merged 6 commits into
masterfrom
MER-5772-73-fix-arrows-and-empty-cites
Jul 13, 2026
Merged

[ENHANCEMENT] [MER-5771][MER-5772][MER-5773][MER-5774][MER-5775] Handle various quirks found in PIMA French XML#299
rgachuhi merged 6 commits into
masterfrom
MER-5772-73-fix-arrows-and-empty-cites

Conversation

@andersweinstein

@andersweinstein andersweinstein commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Enhance migration tool to deal with multiple XML source quirks found in legacy course XML for PIMA French. While some of these could be addressed by source XML changes, they are straightforward to deal with so handling in migration tool saves migrators from having to modify source packages manually before conversion. It also makes the migration tool more robust to deal with all these forms found in the wild.

  • Converts <sym name="rarr"/> into a bold Unicode right arrow (→) before unsupported sym elements are removed.
  • Strips <cite> wrappers that do not resolve to bibliography entries while preserving their text and nested formatting. (Empty<cite/> elements continue to be entirely removed as before.)
  • Trim leading and trailing whitespace in legacy media URLs before resolving the referenced files so attributes with trailing spaces are handled correctly as in legacy processing.
  • Trim whitespace from assessment IDs before generating activities, ensuring inline assessments resolve correctly rather than producing empty content pages when trailing space is included in attribute.
  • Preserve leading and trailing whitespace within <foreign> elements so adjacent foreign-language text remains correctly spaced after conversion.

Testing

Added regression coverage verifying:

  • Right-arrow symbols produce { text: "→", strong: true } in the generated content model.
  • Other unsupported sym elements are still removed.
  • Invalid citation wrappers preserve text and nested emphasis.
  • Empty invalid citations produce no content
  • Media references with surrounding whitespace resolve to the expected file and flattened media URL.
  • Trimmed assessment IDs are used consistently for activity IDs, titles, legacy IDs, and page references.
  • exact whitespace preservation at <foreign> element boundaries.

@andersweinstein andersweinstein changed the title [ENHANCEMENT] [MER-5772] [MER-5773] Repair legacy right-arrow symbols and invalid citation wrappers [ENHANCEMENT] [MER-5772] [MER-5773] Handle various XML quirks found in PIMA French Jul 10, 2026
@andersweinstein andersweinstein changed the title [ENHANCEMENT] [MER-5772] [MER-5773] Handle various XML quirks found in PIMA French [ENHANCEMENT] [MER-5772] [MER-5773] [MER-5774] Handle various XML quirks found in PIMA French Jul 10, 2026
@andersweinstein andersweinstein changed the title [ENHANCEMENT] [MER-5772] [MER-5773] [MER-5774] Handle various XML quirks found in PIMA French [ENHANCEMENT] [MER-5771] [MER-5772] [MER-5773] [MER-5774] Handle various quirks found in PIMA French XML Jul 10, 2026
@andersweinstein andersweinstein changed the title [ENHANCEMENT] [MER-5771] [MER-5772] [MER-5773] [MER-5774] Handle various quirks found in PIMA French XML [ENHANCEMENT] [MER-5771] [MER-5772][MER-5773][MER-5774][MER-5775] Handle various quirks found in PIMA French XML Jul 10, 2026
@andersweinstein andersweinstein changed the title [ENHANCEMENT] [MER-5771] [MER-5772][MER-5773][MER-5774][MER-5775] Handle various quirks found in PIMA French XML [ENHANCEMENT] [MER-5771][MER-5772][MER-5773][MER-5774][MER-5775] Handle various quirks found in PIMA French XML Jul 10, 2026
@rgachuhi
rgachuhi merged commit 4897159 into master Jul 13, 2026
2 checks passed
@rgachuhi
rgachuhi deleted the MER-5772-73-fix-arrows-and-empty-cites branch July 13, 2026 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants