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 selection in formatives [MER-2561] #201

Closed andersweinstein closed 1 year ago

andersweinstein commented 1 year ago

Pool selections in legacy inline assessments (formatives) were not being processed correctly. Referencing WB page got no selection elements so no questions shown. Used throughout Logic and Proofs course.

Happened because, in summatives, selections become part of the content model put into the resulting Page resource. But for inline assessments, migration does not produce any Page resource. Rather, it only extracts and returns a set of derived resource "items" (questions => Activities) contained in the inline. These ultimately get pasted into referencing pages during the post-processing patchup done after all resources seen to replace the inline reference placeholder on referencing WB pages. But the processing of formatives was not returning any derived resource for the pool selections in its "items", so these never got patched in to the referencing pages.

Pool selection instructions are more like content then Activities. Turns out they can be handled by returning selections as a TemporaryContent item, an existing sort of pseudo-resource holding a piece of content which was being handled for formatives.

This also fixes a glitch in detection of pool resource type when DOCTYPE tag split over multiple lines, which also came up in Logic and Proofs instance.