Simon-Initiative / oli-torus

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

[BUG FIX] [NG23-263] likert activity not restoring state beyond first item #4933

Closed eliknebel closed 1 week ago

eliknebel commented 1 week ago

Fixes an issue where activities with multiple part inputs were not being reinitialized past the first part input.

The issue here was the defaultPartInputs being calculated is used to derive the actual part inputs from the activityState. However, this initialization was hard coded to only generate a default part input for the first part in an activity, an assumption that was likely baked in before activities with multiple parts (such as Likert) existed.

The fix here generates default part inputs from all parts in the activity state.