QTI Survey fixes#13791
Conversation
Combine functionality to simplify. Update tests.
Build Artifacts
|
| // Valid values | ||
| expect(declaration.isValueCompatible(42)).toBe(true); | ||
| expect(declaration.isValueCompatible(null)).toBe(true); | ||
| // Valid values should not throw |
There was a problem hiding this comment.
so the changes here just make the validation/error surfacing more robust?
There was a problem hiding this comment.
Yes - I had previously constructed separate validity and coersion checks. The validity checks were more picky, and the coersion less so. I cleaned this up by making the coersion as strict as the validity checks and just going straight to coersion, throwing a TypeError when the value was not valid. All the test updates are a consequence of this new behaviour.
Ultimately, none of this should happen in production, because our components should setting the appropriate data - and we'll be sure of this because it will throw TypeErrors if it doesn't!
There was a problem hiding this comment.
One clarifying but non-blocking question (eta: replied/resolved!) about the test changes. Manual testing done to support the studio release by me and Radina confirms this fix (and there are a few follow up issues to be tracked - both in kolibri and studio), and code changes make sense. this is good to go
146cf7d
into
learningequality:release-v0.18.x
Summary
References
Fixes the Kolibri side of #13754
Reviewer guidance
Import
varik-falukfrom hotfixes.Verify that multiple choice and numeric input questions function as expected.
For fixes for free response questions, see: learningequality/studio#5408
Screenshot of Multiple choice updates:

Screenshot of numeric input updates:

Screenshot of free response updates:
