Simon-Initiative / oli-torus

Next Generation OLI Authoring and Delivery Platform
https://proton.oli.cmu.edu
MIT License
81 stars 35 forks source link

[ENHANCEMENT] [MER-3368] make score authoring handle implicit custom scoring on migrated questions #4877

Closed andersweinstein closed 1 month ago

andersweinstein commented 1 month ago

Migrated legacy questions may carry non-standard point values for correct responses and partial credit scores for incorrect responses. These get used by torus in scoring. However, since custom score editing was added to torus authoring, these migrated questions have problems because they do not include the flags being used by the newer torus authoring code to detect custom scoring:

This PR changes torus score authoring to treat migrated questions with “implicit custom scoring” as having custom scoring. The idea is to package the test for custom scoring into subroutines, hasCustomScoring (for single-part questions) and usesCustomScoring (for multi-inputs), and use these everywhere in place of testing flags directly. Similarly,getOutOfPoints should be used to get the effective correct score value for both representations.

Also the handling of multi-input score type changes was corrected to reset all scores where needed.

Note in the torus implementation, multi-input questions use a different representation of custom scoring (an activity-wide customScoring flag) than single-part questions do (a defined outOf value in the part), so both types of question should be tested. For test cases one may export and ingest the questions from the FCDS course and look at activity bank questions. Searching by item type can find multi-input questions. Some CATA questions reveal partial credit responses.

Note 2: the torus custom score authoring interface does not enforce consistency, in that it allows a user to assign a point value to a wrong answer that is greater than the designated correct answer point value. Such a situation may lead to unexpected scoring behavior. But this is an independent issue.