"cardsort": proposed one-off XML for Runestone ingestion
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 52/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- html, javascript, xml
- Domain
- frontend
Research direction
The issue names no file paths, so start by locating how the existing matching component emits its <script type="text/xml"> island inside a <div data-component="matching">, then mirror that path for cardsort. Use the sample payload as the acceptance target, checking empty feedback-correct/feedback-incorrect elements and many-to-one answer pairings. Done when the generated output contains the cardsort XML island and the existing rendering/tests still pass.
Written by the indexing model from the issue text.
Description
We're moving the PreTeXt cardsort interactive off the dragndrop HTML representation and onto a one-off XML island, mirroring how matching already works: a <div data-component="cardsort"> containing a <script type="text/xml"> payload for the Runestone JS to parse (as HTML, per the same convention as matching).
Here's the full emitted payload for a sample cardsort (countries → confederations), which exercises every part of the format:
<script type="text/xml">
<cardsort>
<statement>
<div class="para" id="cardsort-soccer-3-1">Sort each national team into the continental confederation it competes in.<div class="autopermalink" aria-hidden="true" data-description="Paragraph"><a tabindex="-1" href="#cardsort-soccer-3-1" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
</statement>
<feedback>
<div class="para" id="cardsort-soccer-4-1">Each country belongs to exactly one continental confederation.</div>
</feedback>
<premise>
<id>cardsort-soccer-p1</id>
<label>
<div class="para" id="cardsort-soccer-5-1-1-1">England</div>
</label>
<feedback-correct>Correct—England competes in <em class="emphasis">UEFA</em>.</feedback-correct>
<feedback-incorrect>
<div class="para" id="cardsort-soccer-5-1-1-3-1">Not quite.</div>
<div class="para" id="cardsort-soccer-5-1-1-3-2">Of the <span class="process-math">\(6\)</span> FIFA confederations, England belongs to <em class="emphasis">UEFA</em>.</div>
</feedback-incorrect>
</premise>
<premise>
<id>cardsort-soccer-p2</id>
<label>
<div class="para" id="cardsort-soccer-5-1-2-1">France</div>
</label>
<feedback-correct/>
<feedback-incorrect>France is European—look to <em class="emphasis">UEFA</em>.</feedback-incorrect>
</premise>
<premise>
<id>cardsort-soccer-p3</id>
<label>
<div class="para" id="cardsort-soccer-5-2-1-1">USA</div>
</label>
<feedback-correct>Right! The United States plays in <em class="emphasis">CONCACAF</em>.</feedback-correct>
<feedback-incorrect/>
</premise>
<premise>
<id>cardsort-soccer-p4</id>
<label>Egypt</label>
<feedback-correct/>
<feedback-incorrect/>
</premise>
<response>
<id>cardsort-soccer-r1</id>
<label>UEFA</label>
</response>
<response>
<id>cardsort-soccer-r2</id>
<label>CONCACAF</label>
</response>
<response>
<id>cardsort-soccer-r3</id>
<label>CAF</label>
</response>
<answer premise="cardsort-soccer-p1" response="cardsort-soccer-r1"/>
<answer premise="cardsort-soccer-p2" response="cardsort-soccer-r1"/>
<answer premise="cardsort-soccer-p3" response="cardsort-soccer-r2"/>
<answer premise="cardsort-soccer-p4" response="cardsort-soccer-r3"/>
</cardsort>
</script>
Structure:
statement,feedback— the exercise prompt and overall feedback (rendered HTML).premise— one per card: a stableid, alabel(rendered HTML), and per-premisefeedback-correct/feedback-incorrectthat are always present but may be empty (shown when the card is placed correctly / incorrectly).p2/p3show the one-sided cases;p4shows none.response— one per drop category:id+label.answer— the correct pairings, by id. Many-to-one is supported:p1andp2both map tor1(UEFA).
Claude Opus 4.8, acting as a coding assistant for Rob Beezer
- Dominant language
- XSLT
- Stars
- 466
- Forks
- 251
- Avg merge
- 4m
- Merged PRs (30d)
- 13
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from PreTeXtBook/pretext
-
The print preview leaves writing space short by the margins of hidden headers, footers and solutionsOpen
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
PreTeXtBook/pretext#3329 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
PreTeXtBook/pretext#3305 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
PreTeXtBook/pretext#3297 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
PreTeXtBook/pretext#3285 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
PreTeXtBook/pretext#3283 ·
Maintainers usually reply within 1 day
All issues in PreTeXtBook/pretext
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
vigetlabs/wordpress-site-starter#331 ·
Maintainers usually reply within 17 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
vicharanashala/vibe#1542 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
mattabate/life-distributable#231 ·
Maintainers usually reply within 1 day
-
PROJECT: website-redesign
Difficulty 1/5 Under an hour Newbie friendliness 72/100
thewca/worldcubeassociation.org#16617 ·
Maintainers usually reply within 1 day
-
enhancement triage:not-checked
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
inventree/InvenTree#13318 · 1 reaction ·
Maintainers usually reply within 1 day