Skip to content

feat(QTI): add associate and match interaction viewers - #15151

Open
habibayman wants to merge 17 commits into
learningequality:developfrom
habibayman:feat/qti-associate-match
Open

feat(QTI): add associate and match interaction viewers#15151
habibayman wants to merge 17 commits into
learningequality:developfrom
habibayman:feat/qti-associate-match

Conversation

@habibayman

@habibayman habibayman commented Aug 5, 2026

Copy link
Copy Markdown
Member

@github-actions github-actions Bot added DEV: renderers HTML5 apps, videos, exercises, etc. APP: Device Re: Device App (content import/export, facility-syncing, user permissions, etc.) APP: Coach Re: Coach App (lessons, quizzes, groups, reports, etc.) DEV: frontend SIZE: very large labels Aug 5, 2026
@habibayman habibayman changed the title feat(QTI) feat(QTI): add associate interaction viewer (connect pairs) Aug 5, 2026
@learning-equality-bot

Copy link
Copy Markdown

👋 Hi @habibayman, thanks for contributing!

For the review process to begin, please verify that the following is satisfied:

  • Contribution is aligned with our contributing guidelines

  • Pull request description has correctly filled AI usage section & follows our AI guidance:

    AI guidance

    State explicitly whether you didn't use or used AI & how.

    If you used it, ensure that the PR is aligned with Using AI as well as our DEEP framework. DEEP asks you:

    • Disclose — Be open about when you've used AI for support.
    • Engage critically — Question what is generated. Review code for correctness and unnecessary complexity.
    • Edit — Review and refine AI output. Remove unnecessary code and verify it still works after your edits.
    • Process sharing — Explain how you used the AI so others can learn.

    Examples of good disclosures:

    "I used Claude Code to implement the component, prompting it to follow the pattern in ComponentX. I reviewed the generated code, removed unnecessary error handling, and verified the tests pass."

    "I brainstormed the approach with Gemini, then had it write failing tests for the feature. After reviewing the tests, I used Claude Code to generate the implementation. I refactored the output to reduce verbosity and ran the full test suite."

Also check that issue requirements are satisfied & you ran pre-commit locally.

Pull requests that don't follow the guidelines will be closed.

Reviewer assignment can take up to 2 weeks.

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

@habibayman
habibayman force-pushed the feat/qti-associate-match branch from b82b9cc to 49c46e4 Compare August 10, 2026 11:38
@github-actions

Copy link
Copy Markdown
Contributor

npm Package Versions

Warning

The following packages have changed files but no version bump:

Package Version Changed files
kolibri 0.18.0 1

If these changes affect published code, consider bumping the version.

@habibayman
habibayman marked this pull request as ready for review August 12, 2026 14:29

@rtibbles rtibbles left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just a quick first pass review - this seems to be going in a good direction, the main thing that surprised me was the seemingly limited code reuse between Match and Associate - I had assumed because one is essentially the "1 fixed column" form of the other that we would be sharing a lot more code with a one column 'prefilled' and not dynamic. Clearly this is not 3 instances, so there could be a good case to be made for not sharing logic, but they seemed so similar and the specs are so aligned it feels worthy of discussion.


// Choices are static: parse the slot vnodes once rather than on every render.
const allContent = (slots.default && slots.default()) || [];
const nonChoiceContent = allContent.filter(vnode => getComponentTag(vnode) !== CHOICE_TAG);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I am squinting my eyes and starting to see things we may be able to reuse here. Rule of three is coming into view!


const rowCount = computed(() => {
const max = typedProps.maxAssociations.value;
// max-associations="0" means unlimited, so offer as many pairs as the

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I guess at least it was 0 and not -1.

provide('isSelected', isSelected);
provide('toggleSelection', toggleSelection);

const getShuffledOrder = choices => {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Reduce, reuse, recycle! Very good.


<span
class="qti-simple-associable-choice"
dir="auto"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this purely to add dir="auto"? Not objecting, just checking the motivation.

<template>

<!--
Rendered indirectly: MatchInteraction reads the two sets out of its slot to

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If there are multiple cases like this, it may be better simply to register "pass through" qti tags to tell DOMPurify to leave them alone.

@habibayman
habibayman force-pushed the feat/qti-associate-match branch from 80a5b77 to da30398 Compare August 13, 2026 20:46
@habibayman habibayman changed the title feat(QTI): add associate interaction viewer (connect pairs) feat(QTI): add associate and match interaction viewers Aug 13, 2026
@habibayman
habibayman force-pushed the feat/qti-associate-match branch from da30398 to 3020bdf Compare August 13, 2026 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

APP: Coach Re: Coach App (lessons, quizzes, groups, reports, etc.) APP: Device Re: Device App (content import/export, facility-syncing, user permissions, etc.) DEV: frontend DEV: renderers HTML5 apps, videos, exercises, etc. SIZE: very large

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Product Issue: Build QTI Match Interaction Product Issue: build QTI Associate (connect pairs) Interaction

2 participants