Add the QTI associate interaction plugin - #6113
Open
rtibblesbot wants to merge 5 commits into
Open
Conversation
rtibblesbot
force-pushed
the
issue-6101-e6feda
branch
2 times, most recently
from
August 31, 2026 16:43
e4e54df to
6e5a1f4
Compare
Splits the single flat pool of <qti-simple-associable-choice> elements into authoring state: `pairs` from the correct response, `distractors` from the match-max capacity the correct response does not consume. buildXML re-merges them, normalizing ids so equal content shares one pool entry. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Registering the descriptor does not populate QUESTION_TYPE_LABELS, so QTIItemEditor gets an explicit ASSOCIATE entry — without it every associate item's view-mode header reads "Unknown type". Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
rtibblesbot
force-pushed
the
issue-6101-e6feda
branch
from
August 31, 2026 16:53
6e5a1f4 to
2c9fff3
Compare
rtibblesbot
marked this pull request as ready for review
August 31, 2026 16:54
AlexVelezLl
requested changes
Aug 31, 2026
AlexVelezLl
left a comment
Member
There was a problem hiding this comment.
@rtibblesbot, from the screenshots, I can see that the padding of the chips is not the same as in the specs, and the colors of the pair rows are not the same as in the specs. Take a closer look at the images in the issue and check that everything is correctly aligned.
Contributor
Author
|
@AlexVelezLl Fixed, and I swept every element in the editor against the six mockups rather than only the two you named — eight divergences, all changed:
Two mockup details I left out, both more than styling — say the word and I'll add them:
@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly |
Pair rows, cards, chips and pool boxes took colours, padding and copy that diverge from the issue's mockups. Measured against them: - pair rows: grey.v_50 with a fineLine border, cards on surface, 40px tall - chips: 12px each side, 8px before the delete control, tinted only in the distractor pool, where they sit on the surface rather than the tint - pair validation message: aligned to the row's left edge, not indented under the cards - correct-answer chip border: green.v_600, as the sibling editors use - section and button copy taken verbatim from the mockups Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
rtibblesbot
force-pushed
the
issue-6101-e6feda
branch
from
August 31, 2026 22:18
e0394dd to
6ce2d00
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Summary
"Connect pairs" questions could not be authored: an item whose body is
<qti-associate-interaction>had no plugin, so its header read "Unknown type" and its body was uneditable. This adds the plugin end to end — the flat choice pool parses into correct pairs plus distractors, serializes back to acardinality="multiple" base-type="pair"declaration, validates, and renders in an editor.References
Fixes #6101.
Reviewer guidance
JS tests pass on CI. Beyond those, on the QTI demo page (
/channels/<id>/#/qti-demo, question 7):<qti-value>gains a matching space-separated id couple.Worth questioning:
buildXMLcollapses two choices with equal text into one pool entry and bumps itsmatch-max, so an author who deliberately wants two visually identical options gets one. Blank content is exempt, otherwise a freshly added pair could not round-trip.match-maxminus the choice's appearances in the correct response, so hand-written XML with amatch-maxlarger than intended silently gains distractors on import.Screenshots
axe-core (WCAG 2 AA) on the demo page reports one violation: colour contrast on
AddListItemButton's label. It reproduces on the unchanged ordering editor, which uses the same shared component.AI usage
Used Claude Code to implement the plugin test-first against a written plan, following the ordering interaction as the reference. Verified with the Jest suite,
pre-commit, manual QA on the QTI demo page, and an axe-core audit.@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly
How was this generated?
🟡 Waiting for feedback
Last updated: 2026-08-31 22:21 UTC