Skip to content

Comments

QTI Survey fixes#13791

Merged
marcellamaki merged 3 commits intolearningequality:release-v0.18.xfrom
rtibbles:answer_me_this
Sep 30, 2025
Merged

QTI Survey fixes#13791
marcellamaki merged 3 commits intolearningequality:release-v0.18.xfrom
rtibbles:answer_me_this

Conversation

@rtibbles
Copy link
Member

@rtibbles rtibbles commented Sep 26, 2025

Summary

  • Does a slight fix for multiple choice display issues in QTI
  • Fixes answer handling in QTI
  • Adds input type setting for text interactions, based on the expected response type

References

Fixes the Kolibri side of #13754

Reviewer guidance

Import varik-faluk from 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:
image

Screenshot of numeric input updates:
image

Screenshot of free response updates:
image

@marcellamaki marcellamaki self-requested a review September 30, 2025 17:50
@marcellamaki marcellamaki self-assigned this Sep 30, 2025
// Valid values
expect(declaration.isValueCompatible(42)).toBe(true);
expect(declaration.isValueCompatible(null)).toBe(true);
// Valid values should not throw
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so the changes here just make the validation/error surfacing more robust?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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!

Copy link
Member

@marcellamaki marcellamaki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@marcellamaki marcellamaki merged commit 146cf7d into learningequality:release-v0.18.x Sep 30, 2025
53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DEV: frontend DEV: renderers HTML5 apps, videos, exercises, etc. SIZE: large

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants