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] handle special chars in regex match; support case-insensitive matches MER-1745, MER-1746 #127

Closed andersweinstein closed 1 year ago

andersweinstein commented 1 year ago

Fixes MER-1745, MER-1746. Adjusts regex matching for answer patterns for text input items to escape special characters where needed and to support case-insensitive matching where that option is set.

This also attempts to change the translation of case-sensitive literal string matches into "equals" rules, rather than "like" rules, to avoid escaping metacharacters where not necessary. However, currently the equals operator does not show up on the torus answer authoring interface (MER-1762). These present as "contains" rules on the interface. However, they seem to work as desired.

Case-sensitive matches are rare in the chemistry course, used in only one extra practice on elements. All other text matches in that course are left as case-insensitive.