Simon-Initiative / course-digest

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

[ENHANCEMENT] translate set rules for CATA, hotspot questions [MER-1932] #148

Closed andersweinstein closed 1 year ago

andersweinstein commented 1 year ago

For multiple-selection items (Check All That Apply, multi-select image-hotspot), legacy implemented a notation for specifying a variety of set-theoretic rules for matching responses. This makes it possible to specify a single targeted feedback for a response matching a subset/proper subset/superset/proper superset of a given list of choices. This is used in some questions in Logic and Proofs. This PR translates these into equivalent torus rules.

Support for editing or even displaying these correctly on the torus interface is not implemented. For example, a rule giving feedback for a proper subset of {A, B, C} will display as if it is a response for choice set {A, B, C} -- there is no way to specify or show the set operator. However, after ingestion, the resulting rule behind the scenes will work as in legacy as long as the targeted feedback is not modified in the authoring interface.

This also takes the opportunity to streamline and document some of the code, in particular the somewhat involved sequence by which cata responses are converted.