JSON / XML representations of Runestone Questions

13 views
Skip to first unread message

Bradley Miller

unread,
Jun 23, 2026, 5:27:29 PMJun 23
to PreTeXt development
Rob,

First, sorry the first attempt at this managed to go to -announce.

Onward:

Here is a simple example of the existing JSON representation for a card sort:

{ 'correctAnswers': [ ['left-1782245035128', 'right-1782245035129'], ['left-1782245102902', 'right-1782245110367'], ['left-1782245135124', 'right-1782245123236'], ['left-1782245848229', 'right-1782245035129']], 'feedback': 'Not quite. Try again.', 'left': [ {'id': 'left-1782245035128', 'label': '<p>England</p>'}, {'id': 'left-1782245848229', 'label': '<p>France</p>'}, {'id': 'left-1782245102902', 'label': '<p>USA</p>'}, {'id': 'left-1782245135124', 'label': '<p>Egypt</p>'}], 'right': [ {'id': 'right-1782245035129', 'label': '<p>EUEFA</p>'}, {'id': 'right-1782245110367', 'label': '<p>CONCACAF</p>'}, {'id': 'right-1782245123236', 'label': '<p>CAF</p>'}], 'statement': '<p>Here is a cool card sort question. Match the national teams to 
their regional confederation.</p>’}


Correct / incorrect feedback keys would be added to the list of objects referenced by the ‘left’ key.

statement, feedback, plus new feedback(s) could all contain arbitrary html.

Brad


Brad Miller
Professor Emeritus, Luther College
Founder, Runestone Academy LTD
Blog: http://reputablejournal.com

Set up a time to meet with me.


Rob Beezer

unread,
Jun 23, 2026, 7:32:27 PMJun 23
to prete...@googlegroups.com
Thanks, Brad. Sorry I missed the retry, several balls in the air right now. ;-)

And you want XML that mirrors the JSON? If you ran the JSON though your
tool/converter would it give me an even better leg-up?

What is the significance of the huge integers? Can I just use 1, 2, 3, 4? (Are
they local to the problem, or global?)

So many questions.

Rob
> Set up a time to meet <https://fantastical.app/bonelake-Gj2i/meet-with-
> brad> with me.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-dev...@googlegroups.com <mailto:pretext-
> dev+uns...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-
> dev/967E0633-B4C1-4284-9B2E-AD146C909984%40runestone.academy <https://
> groups.google.com/d/msgid/pretext-dev/967E0633-B4C1-4284-9B2E-
> AD146C909984%40runestone.academy?utm_medium=email&utm_source=footer>.

Bradley Miller

unread,
Jun 24, 2026, 8:57:45 AMJun 24
to PreTeXt development
I don’t have a tool that would go from JSON to XML, but I could probably create one, or just ask claude to write one.  Sounds like a fun little project, I’ll let you know later today.

The example I showed was built in the web interface, it does not ask the user to provide identifiers like an author of a question would need to do in PreTeXt.  They are used as ids of the spans that are dragged and dropped so they do need to be unique.  I think you may already handle that with the document-id + edition prefix to whatever the author chooses.

Brad

Brad Miller
Professor Emeritus, Luther College
Founder, Runestone Academy LTD
Blog: http://reputablejournal.com

Set up a time to meet with me.


To unsubscribe from this group and stop receiving emails from it, send an email to pretext-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/MTAwMDAwNC5iZWV6ZXI.1782257543%40pnsh.

Bradley Miller

unread,
Jun 24, 2026, 11:57:28 AMJun 24
to PreTeXt development
My assistant recommended that we can re-use a lot of what we did for matching.

<cardsort>

    <statement><p>Here is a cool card sort question</p></statement>

    <feedback>Not quite. Try again.</feedback>


    <premise>

      <id>left-1782245035128</id>

      <label><p>England</p></label>

    </premise>

    <premise>

      <id>left-1782245848229</id>

      <label><p>France</p></label>

    </premise>

    <premise>

      <id>left-1782245102902</id>

      <label><p>USA</p></label>

    </premise>

    <premise>

      <id>left-1782245135124</id>

      <label><p>Egypt</p></label>

    </premise>


    <response>

      <id>right-1782245035129</id>

      <label><p>EUEFA</p></label>

    </response>

    <response>

      <id>right-1782245110367</id>

      <label><p>CONCACAF</p></label>

    </response>

    <response>

      <id>right-1782245123236</id>

      <label><p>CAF</p></label>

    </response>


    <answer premise="left-1782245035128" response="right-1782245035129"/>

    <answer premise="left-1782245102902" response="right-1782245110367"/>

    <answer premise="left-1782245135124" response="right-1782245123236"/>

    <answer premise="left-1782245848229" response="right-1782245035129"/>

  </cardsort>


Seems simple enough to add a <feedback-correct>….</feedback-correct> and <feedback-incorrect>...</feedback-incorrect> inside each premise.


Brad


Brad Miller
Professor Emeritus, Luther College
Founder, Runestone Academy LTD
Blog: http://reputablejournal.com

Set up a time to meet with me.

Rob Beezer

unread,
Jun 24, 2026, 2:43:08 PMJun 24
to prete...@googlegroups.com
We had to pair premise and response into an #answer since #matching was so broad.

For #cardsort, we can associate premise-s with their one true response by
nesting them together. Which do you like?

Also, would you like to *always* have a #feedback-correct AND a
#feedback-incorrect, which could be possibly empty? Or do you only want those
elements if there is content for them?

Rob
> <answerpremise="left-1782245848229"response="right-1782245035129"/>
>
> </cardsort>
>
>
> Seems simple enough to add a <feedback-correct>….</feedback-correct> and
> <feedback-incorrect>...</feedback-incorrect> inside each premise.
>
>
> Brad
>
>
> Brad Miller
> Professor Emeritus, Luther College
> Founder, Runestone Academy LTD
> Blog: http://reputablejournal.com
>
> Set up a time to meet <https://fantastical.app/bonelake-Gj2i/meet-with-
> brad> with me.
>
>
>> On Jun 24, 2026, at 7:57 AM, Bradley Miller <br...@runestone.academy> wrote:
>>
>> I don’t have a tool that would go from JSON to XML, but I could probably
>> create one, or just ask claude to write one.  Sounds like a fun little
>> project, I’ll let you know later today.
>>
>> The example I showed was built in the web interface, it does not ask the user
>> to provide identifiers like an author of a question would need to do in
>> PreTeXt.  They are used as ids of the spans that are dragged and dropped so
>> they do need to be unique.  I think you may already handle that with the
>> document-id + edition prefix to whatever the author chooses.
>>
>> Brad
>>
>> Brad Miller
>> Professor Emeritus, Luther College
>> Founder, Runestone Academy LTD
>> Blog: http://reputablejournal.com
>>
>> Set up a time to meet <https://fantastical.app/bonelake-Gj2i/meet-with-
>> brad> with me.
>>
>>
>>> On Jun 23, 2026, at 6:32 PM, 'Rob Beezer' via PreTeXt development <pretext-
>>>> <https://fantastical.app/bonelake-Gj2i/meet-with-%20brad>> with me.
>>>> --
>>>> You received this message because you are subscribed to the Google Groups
>>>> "PreTeXt development" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send an
>>>> email topretext-de...@googlegroups.com <mailto:pretext-
>>>> dev+uns...@googlegroups.com><mailto:pretext-
>>>> dev+uns...@googlegroups.com <mailto:dev+uns...@googlegroups.com>>.
>>>> To view this discussion visithttps://groups.google.com/d/msgid/pretext-
>>>> <https://groups.google.com/d/msgid/pretext->dev/967E0633-B4C1-4284-9B2E-
>>>> AD146C909984%40runestone.academy <https://groups.google.com/d/msgid/pretext-
>>>> dev/967E0633-B4C1-4284-9B2E- <http://groups.google.com/d/msgid/pretext-
>>>> dev/967E0633-B4C1-4284-9B2E->AD146C909984%40runestone.academy?
>>>> utm_medium=email&utm_source=footer>.
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "PreTeXt development" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an
>>> email topretext-de...@googlegroups.com <mailto:pretext-
>>> dev+uns...@googlegroups.com>.
>>> To view this discussion visithttps://groups.google.com/d/msgid/pretext-dev/
>>> MTAwMDAwNC5iZWV6ZXI.1782257543%40pnsh <https://groups.google.com/d/msgid/
>>> pretext-dev/MTAwMDAwNC5iZWV6ZXI.1782257543%40pnsh>.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-dev...@googlegroups.com <mailto:pretext-
> DFAC2656-A86D-4974-BAEE-9E3641D85076%40runestone.academy <https://
> groups.google.com/d/msgid/pretext-dev/DFAC2656-A86D-4974-
> BAEE-9E3641D85076%40runestone.academy?utm_medium=email&utm_source=footer>.

Bradley Miller

unread,
Jun 24, 2026, 2:53:45 PMJun 24
to PreTeXt development
The markup for matching was #edge which didn’t make any sense for cardsort.

I think what I sent you is easy to read, but I can have my assistant refactor to whatever markup you want to manufacture for the manifest.

I don’t see any reason why I would ever go from JSON to XML.  Its only XML to JSON so we do not cause your JSON allergy to flare up.

I think I like the idea of both feedback tags being present even if empty. (unless that breaks lots of XML rules)

Brad

Brad Miller
Professor Emeritus, Luther College
Founder, Runestone Academy LTD
Blog: http://reputablejournal.com

Set up a time to meet with me.


-- 
You received this message because you are subscribed to the Google Groups "PreTeXt development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-dev...@googlegroups.com <mailto:pretext- dev+uns...@googlegroups.com>.
To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/ DFAC2656-A86D-4974-BAEE-9E3641D85076%40runestone.academy <https:// groups.google.com/d/msgid/pretext-dev/DFAC2656-A86D-4974- BAEE-9E3641D85076%40runestone.academy?utm_medium=email&utm_source=footer>.

-- 
You received this message because you are subscribed to the Google Groups "PreTeXt development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/MTAwMDAzNS5iZWV6ZXI.1782326586%40pnsh.

Reply all
Reply to author
Forward
0 new messages