Simon-Initiative / course-digest

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

[BUG FIX] [MER-3636] handle manual graded multi-inputs #266

Closed andersweinstein closed 2 months ago

andersweinstein commented 2 months ago

French course included some manually graded multi-input questions with text inputs. These were not being migrated correctly, not only because the grading type attribute was not processed at all for this question type, but also because questions used part definitions of the following form:

<part id="part1" targets="M2L1_pool2_q3_input1" score_out_of="3" />
 <part id="part2" targets="M2L1_pool2_q3_input2" score_out_of="4" />
 <part id="part3" targets="M2L1_pool2_q3_input3" score_out_of="3" />

in which parts are associated with inputRefs vis the "targets" attribute and contain no responses, a structure that also was never handled.

This PR adds support for migrating such questions correctly. It fills in default correct and incorrect responses to get past torus authoring UI requirements.

This also takes the opportunity cleans up some code in the relevant routines and add a bit of documentation on the somewhat involved processing being done.