interactives as Runestone Exercises

70 views
Skip to first unread message

Bradley Miller

unread,
Oct 15, 2025, 5:15:30 PMOct 15
to PreTeXt development
There are now a few different books that are using interactives to build custom exercises.  Correctly using the SPLICE protocol we can save and restore student answers!! 

But without having them in the database they cannot be assigned and counted towards an assignment total in our gradebook.  So, what to do?

  • We could do this on the runestone side as a data entry exercise.  
  • I’m planning on building a new question type that is a generic “iframe” question so that any exercise that supports SPLICE could be assigned.
  • For PreTeXt books would it make sense that these things find their way into the manifest.  Maybe an  #exercise  that contains an #interactive could find its way into the runestone-manifest.xml file?

Maybe there are other ideas.


Brad




















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

Set up a time to meet with me.


Andrew Scholer

unread,
Oct 15, 2025, 8:30:17 PMOct 15
to prete...@googlegroups.com
For the manifest:

We had a previous discussion kicking around ideas about this:
https://groups.google.com/g/pretext-dev/c/JXoiidF86Do/m/IAk_apdsAQAJ

The final post there was an @grading="splice" in the <interactive>. That still seems reasonable to me. I'm not sure we want to throw interactives that do not have any ability to report interaction or grades into the manifest. Having those visible in the assignment builder, or even worse, having reading assignments attempt to count them, would lead to confusion.

Andrew


--
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/F660B942-FAC3-4C23-BC14-B1286BA7776E%40runestone.academy.

Bradley Miller

unread,
Oct 16, 2025, 10:24:48 AMOct 16
to PreTeXt development
Thanks Andrew,

I knew this had been discussed at least during drop in a few times.

The @grading=“splice” seems reasonable.  I think the author would also supply an @label and it would be their responsibility to make sure that the implementation of the interactive would also know that id.  Otherwise we would need to implement some kind of messaging to ask for / pass back the label.

Brad

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

Set up a time to meet with me.

Andrew Scholer

unread,
Oct 16, 2025, 10:52:34 AMOct 16
to prete...@googlegroups.com
Yes, @label would be essential.

I am not sure the component would need to be responsible for passing it. It would be logical to require that the component uses the @label as the "location" param in its reportScoreAndState message (https://cssplice.org/slcp/iframe-protocol-specification.html). But it also seems possible that PTX could bundle the label into the iframe container. When a message is emitted from the iframe, the correct label could be deduced from that.

That later approach might enable an author to take a SPLICE activity that emits grading info, but was not designed with a way to configure the "location" param, and put it in a PTX based book.



--
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.

Rob Beezer

unread,
Oct 16, 2025, 11:01:41 AMOct 16
to prete...@googlegroups.com
> Correctly using the SPLICE protocol we can save and restore student answers!!

Congratulations on the work to integrate SPLICE.

> There are now a few different books that are using interactives to build
custom exercises.

Hmmm. I didn't know we were enabling "custom exercises". Which books? And
which #interactive are being used this way? It'd be good to see some examples.

Rob


On 10/16/25 07:24, Bradley Miller wrote:
> Thanks Andrew,
>
> I knew this had been discussed at least during drop in a few times.
>
> The @grading=“splice” seems reasonable.  I think the author would also supply an
> @label and it would be their responsibility to make sure that the implementation
> of the interactive would also know that id.  Otherwise we would need to
> implement some kind of messaging to ask for / pass back the label.
>
> 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 Oct 15, 2025, at 4:15 PM, Bradley Miller <br...@runestone.academy> wrote:
>>
>> There are now a few different books that are using interactives to build
>> custom exercises.  Correctly using the SPLICE protocol we can save and restore
>> student answers!!
>>
>> But without having them in the database they cannot be assigned and counted
>> towards an assignment total in our gradebook.  So, what to do?
>>
>> * We could do this on the runestone side as a data entry exercise.
>> * I’m planning on building a new question type that is a generic “iframe”
>> question so that any exercise that supports SPLICE could be assigned.
>> * For PreTeXt books would it make sense that these things find their way
>> into the manifest.  Maybe an  #exercise  that contains an #interactive
>> could find its way into the runestone-manifest.xml file?
>>
>>
>> Maybe there are other ideas.
>>
>>
>> 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.
>>
>>
>
> --
> 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/2A4992E2-2269-4C33-AC41-08C013E4DD3B%40runestone.academy <https://
> groups.google.com/d/msgid/pretext-dev/2A4992E2-2269-4C33-
> AC41-08C013E4DD3B%40runestone.academy?utm_medium=email&utm_source=footer>.

Bradley Miller

unread,
Oct 16, 2025, 11:04:12 AMOct 16
to PreTeXt development
We are in agreement on the use of the label, however it is deduced.

Rob — See the SPLICE section of the Runestone chapter of the sample book.  Those are the kinds of custom exercises I’m talking about.


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,
Oct 16, 2025, 2:41:59 PMOct 16
to prete...@googlegroups.com
(Sent this several hourts ago. I have a persistent problem with messages not
being sent that I need to resolve. "More later" may now be "soon".)

On 10/16/25 08:03, Bradley Miller wrote:
> Rob — See the SPLICE section of the Runestone chapter of the sample book.  Those
> are the kinds of custom exercises I’m talking about.

Thanks, I forgot we had that. :-(

No good deed goes unpunished. "Figure 5.29.2. Stack pop slideshow" doesn't seem
to render properly? (On Firefox.)

More later. About to step out for the morning.

Rob

Rob Beezer

unread,
Oct 16, 2025, 3:18:28 PMOct 16
to prete...@googlegroups.com
We have interactive, randomized exercises from a variety of sources.


PreTeXt proper - not really, just old-school static questions

Runestone Components - fully integrated by Brad and Rob, FITB reimagined by Brian W

WeBWorK - fully integrated by Alex and Rob, now including raw PG/PGML versions

MyOpenMath - static versions by David L, lots of development by Mark F

STACK - in-progress, Georg and Rob making good progress


In every case there is an attempt to make a particular (consistent) instance as
a "static" version of the dynamic/interactive version available in HTML builds,
ideally as "legal" PreTeXt source to make conversion easy/trivial/automatic.
This makes at least a token attempt to give the reader of print/PDF, EPUB, and
braille, some idea of what a problem is about.

These are all #exercise or PROJECT-LIKE, and therefore amenable to a variety of
features, such as:

- controlling visibility of #hint, #answer, #solution

- a #solutions generator for "back of the book" answers, and more

- a PDF solution manual for distribution to instructors only

- support for a separate (private) repository with solutions only

Now suppose we have an #interactive or #iframe as a child of #exercise. That
may make a lot of sense as a tool for a student to explore some situation
relevant to the rest of the question. Now suppose the #interactive collects
answers. And that #interactive is authored with Doenet, JSXGraph, custom
Javascript, or any other supported language/platform.

I think we have no reliable visibility into that code to be able to support any
of the above features. Unless we can use SLICE somehow to report randomization
and a consistent instance? We already do a poor job (or worse) of representing
a #interactive (or #video, or #audio) in static output formats.

The examples present in the sample book are certainly great exercises for a
computer science textbook. Without too much thought, I can't imagine how to
convert them into static versions in an automated way. Doenet should be on the
above list of integrated random/interactive exercises, but it is not even close
to being ready for that. It is available as an #interactive for the purpose of
showing the reader demonstrations. I would consider it an end-run if this
support for Doenet morphed into some sort of #exercise.

The short answer is that allowing any sort of an #interactive to be an #exercise
strikes me as an HTML-only feature. And if all we are doing is designing
books/markup for HTML output only, then I start to lose interest.

An extreme solution: the presence of certain exercise types means that the only
supported output format is a Runestone build?

Rob

Bradley Miller

unread,
Oct 16, 2025, 4:02:41 PMOct 16
to PreTeXt development
Rob,


The benefits of allowing interactives like the splice examples are huge in that it unlocks libraries of questions that can be included in a textbook.  It is also an avenue for books like the Dive into Systems book that contain specialized exercises that would not be useful in other books.  Or (what brought this back to my attention) the Quantum Computing textbook that is ready to go, save for us to figure out how they can assign the exercises they have built in interactives, again these exercises would not translate to any other book.  Authors are lined up asking how they can use/assign/grade Doenet questions in their books.  Actively seeking an end run.

I acknowledge that I’ve always had a bias for html output, but IMHO the future is going to be more interactive not less, and I’d like to help find a path where we can support that.  Experiment with new question types without having to design new markup.  And then for those that make sense we design markup later.  Why can’t we take the same path as we do for things and provide a QR code for an interactive?  I think playwright would work just fine for this.   Or a screenshot and a QR code?

I can imagine Runestone only ways to “register” these interactive questions.  But it would be a decent amount of extra work for authors and would inevitably get out of sync with the textbook, so I would really like to avoid that.  Funny how I’ve gone from being very anti-iframe to trying to figure out how to incorporate more of them!

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.

Rob Beezer

unread,
Oct 16, 2025, 4:43:52 PMOct 16
to prete...@googlegroups.com
Dear Brad,

I am in agreement with most everything you say here. I see the value of, and
potential for, interactive randomized exercises and agree that HTML is a
superior output format. But EPUB is a great offline format (superior to PDF),
PDF is a great format for producing physical books (some authors do want this),
and braille is essential for some readers (and some laws/regulations).

And I am pleased to see you have decamped from the anti-iFrame crowd. Welcome!
;-) ;-) ;-)

A current #interactive I see as illuminating some topic. Its not going to
work in static formats, and those formats are the worse for that deficiency.
But maybe they are not as critical as graded homework exercises. A screenshot
of an initial state is a really poor substitute for an exercise that a reader is
meant to complete for a class. Technically, I think producing a screenshot and
a QR code would happen already right now. The work might be in disabling all
the features requested, and implemented, for #exercise already. And will
authors end up asking for these features, which I was arguing before are likely
impossible?

I was serious. An #exercise with an #interactive collecting and storing
answers. It only makes sense in HTML output and only makes sense when backed by
a database (i.e. Runestone). So, the presence of such exercises implies a
Runestone-hosted build. Likely very easy to do technically.

> And then for those that make sense we design markup later.

Do we think that is going to happen? ;-) Maybe when it does, and static
versions become possible, then other non-Runestone build targets become possible.

> Authors are lined up asking how they can use/assign/grade Doenet questions in
> their books. Actively seeking an end run.

Then they should talk to the Doenet project about doing the work that has been
done for Runestone, WeBWorK, MyOpenMath, and now STACK. As has been suggested
for years. Having been backed into a corner by WW problems in raw PG/PGML I am
not going down that road again.

Rob

Bradley Miller

unread,
Oct 16, 2025, 5:40:57 PMOct 16
to PreTeXt development
Rob,

So maybe I went a step too far in suggesting putting it in an #exercise.  I’ll admit I didn’t think through all of the expectations/ramifications you raised.  Maybe as Andrew suggested, having @grading=“splice” on the interactive along with an @label is simply a signal that says please add information about this to the runestone-manifest.  That would not set author expectations about hints/solutions etc.  If/when one of these grows up to become a fully developed component with its own PreTeXt markup then hints/solutions/answers become more important.   As an example, some of the SPLICE examples already have built in ways of interactively providing hints.  So they are there but in a different form, and they are probably getting coded in javascript rather than in a more visible markup.

You are right :-) all Runestone is looking to get out of this is a database entry.

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.

Oscar Levin

unread,
Oct 16, 2025, 5:53:08 PMOct 16
to prete...@googlegroups.com
I'm honestly a little perplexed by this discussion.  Back when I was a student, long before the existence of digital textbooks, it was quite common (and reasonable) for math textbooks to have exercises of the sort, "Use a CAS to evaluate the integral and then use the result to answer the question."  I hope we all agree that such a thing should be allowed in a PreTeXt book.  But then what should the HTML output look like?  Why are we telling them to use some external CAS when we could easily and helpfully give them a sage cell to do the computation inside right there in the book?

As a textbook author, I know it can be really great if I don't have to write two versions of a question for different output types.  But I also realize this is not always possible.  A scaffolded problem in WeBWorK just might not be appropriate for a static version of the book.  So in those cases I expect that I should write two versions (and have done so for DMOI).  I try to make them equivalent in spirit.  It would be great if there was an easy way to add a non-disruptive QR code to "try online" to such exercises, but I'm not wishing for ponies right now.

For Doenet, I would expect that every interactive Doenet exercise would get paired with a PreTeXt-authored version that is appropriate for a student to solve off line.  One day, if Doenet wants my continued business, they should make this process easier or automated, but we are all busy.  

Wait, that just gave me an idea!  What if #exercise and #project-like had a new child (or maybe just attribute) that pointed to the "activated" version of the problem to be displayed in an iframe.  Just like webwork does, but now for all interactive exercises?  Only a horrible person would author such an exercise without any "static" content, since that would look bad in all output formats.  The First-Class-Citizen dynamic exercises are just providing the valid PreTeXt static version for the author (which makes them better, but doing so is not necessary).

Oscar
 
"Don't let the perfect be the enemy of the good" -- Voltaire

--
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.

Rob Beezer

unread,
Oct 16, 2025, 6:09:00 PMOct 16
to prete...@googlegroups.com
I'm perplexed, too. (Just kidding.)

Along the lines of some of Oscar's comments, I'd been thinking about versions.
PreTeXt support for versions.

More later - I gotta go do some overdue PROTEUS stuff. And then there is
major-league baseball.

Rob
> email to pretext-dev...@googlegroups.com <mailto:pretext-
> dev%2Bunsu...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/
> MTAwMDA0Mi5iZWV6ZXI.1760647430%40pnsh <https://groups.google.com/d/msgid/
> pretext-dev/MTAwMDA0Mi5iZWV6ZXI.1760647430%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 view this discussion visit https://groups.google.com/d/msgid/pretext-dev/
> CAOU9BaU%2BOp6AMds3A5_0nY8BVSCAikqE9%3DjCsnukzaCanY9X5g%40mail.gmail.com
> <https://groups.google.com/d/msgid/pretext-dev/
> CAOU9BaU%2BOp6AMds3A5_0nY8BVSCAikqE9%3DjCsnukzaCanY9X5g%40mail.gmail.com?
> utm_medium=email&utm_source=footer>.

Duane Nykamp

unread,
Oct 16, 2025, 11:53:51 PMOct 16
to PreTeXt development
Just what to chime in that the Doenet team is well aware of how much more work we have to do to get a reasonable static representation (by having a pure PreTeXt output). Our tiny team is working on a number of critical changes, and progress has been very slow on the static output.

That said, we're open to any contributions in writing PreTeXt renderers for our components or determining what static representations should be! :)

Speaking of Oscar's solution of writing two versions, we may be faced that need anyway due to accessibility mandates. Been hearing about places that are going to prohibit faculty from using any platforms that don't have vendor attestations for full accessibility (to avoid getting sued). Figuring out accessible interactive experiences seems a long way off, so maybe one will need to provide an accessible non-interactive solution in the meantime.

Duane

Rob Beezer

unread,
Oct 18, 2025, 12:57:57 PMOct 18
to prete...@googlegroups.com
> when we could easily and helpfully give them a sage cell to do the
computation inside right there in the book?

You've lost me here. We can do that right now. At issue, among other things,
is a plethora of interactives, whose #answer (and maybe #hint and #solution) are
buried in some HTML-specific way (Javascript), thus invisible to any other
conversion to a less-capable output format.

> As a textbook author, I know it can be really great if I don't have to write
two versions of a question for different output types.

I had not realized that some folks were writing two versions of a problem, and I
think you've beat me to it on that idea.

Rob

On 10/16/25 14:52, Oscar Levin wrote:
> email to pretext-dev...@googlegroups.com <mailto:pretext-
> dev%2Bunsu...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/
> MTAwMDA0Mi5iZWV6ZXI.1760647430%40pnsh <https://groups.google.com/d/msgid/
> pretext-dev/MTAwMDA0Mi5iZWV6ZXI.1760647430%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

Rob Beezer

unread,
Oct 18, 2025, 12:58:51 PMOct 18
to prete...@googlegroups.com
> all Runestone is looking to get out of this is a database entry.

Well, I think you (or more properly, all those authors in that line outside
*your* door) want that to behave like an #exercise. On the assignment page,
in-context, numbered, titled, etc. And then my concern is what happens with all
the exercise-machinery to deal with answers and solutions (with all the
flexibility that has been requested and implemented for exercises already).

Rob

On 10/16/25 14:40, Bradley Miller wrote:
> Rob,
>
> So maybe I went a step too far in suggesting putting it in an #exercise.  I’ll
> admit I didn’t think through all of the expectations/ramifications you raised.
>  Maybe as Andrew suggested, having @grading=“splice” on the interactive along
> with an @label is simply a signal that says please add information about this to
> the runestone-manifest.  That would not set author expectations about hints/
> solutions etc.  If/when one of these grows up to become a fully developed
> component with its own PreTeXt markup then hints/solutions/answers become more
> important.   As an example, some of the SPLICE examples already have built in
> ways of interactively providing hints.  So they are there but in a different
> form, and they are probably getting coded in javascript rather than in a more
> visible markup.
>
> You are right :-) all Runestone is looking to get out of this is a database entry.
>
> 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 Oct 16, 2025, at 3:43 PM, 'Rob Beezer' via PreTeXt development <pretext-
> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/
> BD449F46-9D04-47BC-B620-3B1864C81E02%40runestone.academy <https://
> groups.google.com/d/msgid/pretext-dev/BD449F46-9D04-47BC-
> B620-3B1864C81E02%40runestone.academy?utm_medium=email&utm_source=footer>.

Rob Beezer

unread,
Oct 18, 2025, 1:01:48 PMOct 18
to prete...@googlegroups.com
OK, something to try on for size. I thought maybe strict version support could
provide a solution, but Oscar's post got me thinking. Make it clear there is an
exercise with a purpose and an interactive version, and expect the author to
provide an alternate static version. It begins with markup. Always.

exercise
title
dynamic
statement
static
statement
hint
answer
solution

* dynamic/statement could hold an #interactive that reports out via SPLICE.

* I put #title where I did to be provacative. Not sure if that is right or not.

* #static would be really static. Old-school PreTeXt "free-response", not
multiple-choice, not WW, etc.

* I'm not sure what the children of #dynamic should be. Perhaps no more than
#statement?

* An author in the "I only care about HTML" camp would need to put at least a
token #p in dynamic/statement: "If you were reading the HTML version you would
find a cool interative problem here."

* There is precedent of sorts. An #interactive supports a #static child that
allows replacment by most any PreTeXt you like: images, #p, etc.


The pre-processor categorizes #exercise and PROJECT-LIKE very early. There are
obvious sugnals in teh above. Later, it makes dynamic and static
representations. That split could be easy with the markup above. The resulting
exercises would be rather tightly coupled - same title, same number, etc. So
things like being a target of a #xref will behave. And for now, the #dynamic
version would just lack any #answer to migrate to the back-of-the-book, etc.

> It would be great if there was an easy way to add a non-disruptive QR code to
"try online" to such exercises, but I'm not wishing for ponies right now.

Don't you always get your ponies, Oscar? The QR code might be straightfowrard
to manufacture. Making it big enough to be reliable and small enough to be
non-disruptive is the pony.

Rob

Oscar Levin

unread,
Oct 18, 2025, 1:11:26 PMOct 18
to prete...@googlegroups.com
I really like the direction this is going.  What if I want a hint to apply to both the static and dynamic version?  Not a huge deal, but perhaps the scheme could be

Exercise
  Title
  Statement/@dynamic="yes"
  Statement
  Hint

I'm thinking @dynamic="no" is default.  



--
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.

Rob Beezer

unread,
Oct 18, 2025, 6:06:07 PMOct 18
to prete...@googlegroups.com
Thanks, Oscar.

I'm partial to the very explicit #dynamic/#static, rather than having every
#statement endure the possibility of an irrelevant attribute. Yes, it should go
away after the pre-processor sees it. And I think it allows things like:

exercise
title
dynamic
statement
static
title
statement
hint
answer
solution
solution

In other words, some elements can be hierachical, like exercise/title, with an
override in exercise/static/title. And SOLUTION-LIKE can accumulate,
exercise/static would have two #solution, one of which is common.

I'm not saying I like all those ideas, just arguing for possibilities the
structure enables. In particular, would the two question variants really share
an identical #hint? I would not have expected that.

Rob
> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/
> MTAwMDAwMy5iZWV6ZXI.1760806905%40pnsh <https://groups.google.com/d/msgid/
> pretext-dev/MTAwMDAwMy5iZWV6ZXI.1760806905%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 view this discussion visit https://groups.google.com/d/msgid/pretext-dev/
> CAOU9BaWwK16xE8Pqt1SbYA10_f3o%3DYfqKm3vN9%3D45kfO6fhFfw%40mail.gmail.com
> <https://groups.google.com/d/msgid/pretext-dev/
> CAOU9BaWwK16xE8Pqt1SbYA10_f3o%3DYfqKm3vN9%3D45kfO6fhFfw%40mail.gmail.com?
> utm_medium=email&utm_source=footer>.

Rob Beezer

unread,
Oct 23, 2025, 11:49:16 AMOct 23
to prete...@googlegroups.com
Dear Duane,

Thanks for your note. I meant to reply sooner. More in a minute about this thread.

You might watch closely how work is going with the integration of STACK (-dev
discussion, GitHub pull requests). I think that process will have a lot in
common with how it may go with Doenet.

And, yes, those highly interesrted in Doenet would make good volunteers to work
on this. Our team is tiny, too!

Rob
> --
> 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/
> a7ce8d8d-1e68-4167-9665-1c7c3970fca5n%40googlegroups.com <https://
> groups.google.com/d/msgid/pretext-dev/
> a7ce8d8d-1e68-4167-9665-1c7c3970fca5n%40googlegroups.com?
> utm_medium=email&utm_source=footer>.

Rob Beezer

unread,
Oct 23, 2025, 11:58:12 AMOct 23
to prete...@googlegroups.com
OK, I have roughed out a #exercise with a #dynamic/#static split. Lots of
necessary infrastructure is already in place, so it didn't take long.
Accomplished in the pre-processor so it looks like an authored version when the
conversions begin. Not merged.

The #dynamic version can can go into the Runestone manifest, as yet another
#exercise. So should behave on the assignment page, etc. automatically.

* What should be allowed/encouraged in the #dynamic/#statement of this exercise?

* If a SPLICE-enabled #interactive is present (juast one?), how does it go into
the manifest? I need concrete guidance here.

* What should the #static look like? Old-fashioned PreTeXt free-response
question? Note that it is silly (impossible) to have certain HTML-centric
items, like say a #video. Since there will not be an HTML render of the #static
version. We could make a (option) for a QR code/link to the #dynamic version.

Rob

Rob Beezer

unread,
Nov 11, 2025, 5:58:32 PMNov 11
to prete...@googlegroups.com
Over to Brad for testing.

Two new exercises in the sample book, of the new "dual" static/dynamic exercise
type. Numbers 5.28.6, and 5.28.7, if that should help locate things in files.

5.28.6: a Doenet problem donated by Active Calculus, along with a faithful
static version so we have a good role model. No ide if this should be speaking
SPLICE or not?

5.28.7: an OpenDSA list insertion problem. Maybe some computer scientist wants
to write a related/similar static version? Please?

Just pushed everything for this. Holler if it is easier to consume this some
other way. New XSL was pretty straightforward. Runestone HTML is all
speculative, and is easily changed.

Bradley Miller

unread,
Nov 11, 2025, 6:07:31 PMNov 11
to prete...@googlegroups.com
Thanks Rob,

Duane and I figured out why I was not getting splice messages.  The default is not to send them.  I believe the solution is going to be for Duane to change the defaults on his side, as the splice events will simply be ignored in a non runestone setting.

Hopefully we can fully test soon.  Just waiting for the go ahead from Duane.


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.

Rob Beezer

unread,
Nov 11, 2025, 6:57:55 PMNov 11
to prete...@googlegroups.com
On 11/11/25 15:07, Bradley Miller wrote:
> Duane and I figured out why I was not getting splice messages.

Great!

Maybe the OpenDSA problem is reporting?

Let me know if the Active Calculus problem needs anything, or if the existing
Doenet example should also move into an exercise.

Rob

Bradley Miller

unread,
Nov 11, 2025, 8:22:21 PMNov 11
to prete...@googlegroups.com
Redoing the existing Doenet example and using CDATA would be a big improvement.  Its basically unreadable with all of the ampersand escaping going on.
The current OpenDSA questions are working fine. 

I’ll let you know about the new OpenDSA sometime tomorrow.

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.

Duane Nykamp

unread,
Nov 12, 2025, 1:15:02 PMNov 12
to PreTeXt development
I released DoenetML 0.7.0-beta9, which changes the default save/load flags to `true`. Since PreTeXt grabs `@latest`, it should automatically start sending SPLICE events. (Fingers crossed.)

Bradley Miller

unread,
Nov 12, 2025, 6:37:26 PMNov 12
to PreTeXt development
That seems to have moved us in the wrong direction.  I can see that there are to iframe resize messages then a long pause, then

Screenshot 2025-11-12 at 3.27.12 PM.png

One might think/assume that this was a timeout waiting for a SPLICE.getState message but I’m not getting that message.

The console does show one troubling error related to this:

Uncaught (in promise) TypeError: can't access property "defaultPageReady", MathJax.startup is undefined




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

Set up a time to meet with me.

Duane Nykamp

unread,
Nov 17, 2025, 5:35:46 PMNov 17
to prete...@googlegroups.com
Brad,

I released DoenetML 0.7.0-beta12 which makes it easier to send messages to the parent of an iframe.

The behavior is controlled by a new flag `messageParent`. The flag is `false` by default. If you set the flag to `true`, then it will post messages to `window.parent` if it exists.

To set the `messageParent` flag, you can modify the `<div class="doenetml-applet" >` in `pretext-html.xsl` to include the attribute `data-doenet-message-parent="true"`. When this is set, you should be able to receive the SPLICE events in the iframe parent.

A further step will be to tell Doenet to send the `SPLICE.getState` message, but only when in Runestone. I changed the default of the `allowLoadState` back to `false`, so it doesn't attempt to get the state and then timeout when receiving no response, as you experienced. When you know that Runestone is listening to `SPLICE.getState`, you can add the attribute `data-doenet-allow-load-state="true"` to `<div class="doenetml-applet" >`.

Duane


--
You received this message because you are subscribed to a topic in the Google Groups "PreTeXt development" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pretext-dev/T6X8q-fT6eA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pretext-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/76F3BB0B-EBFC-44EC-B4BC-1C3B39B02455%40runestone.academy.


--
Duane Nykamp
School of Mathematics
University of Minnesota
202 Vincent Hall
206 Church St. SE
Minneapolis, MN 55455
www.math.umn.edu/~nykamp

Bradley Miller

unread,
Nov 17, 2025, 10:17:55 PMNov 17
to prete...@googlegroups.com
Duane,

I think that it is safe to turn getState back to true, because Runestone will respond if asked.

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

Set up a time to meet with me.

On Nov 17, 2025, at 2:35 PM, 'Duane Nykamp' via PreTeXt development <prete...@googlegroups.com> wrote:

Brad,

I released DoenetML 0.7.0-beta12 which makes it easier to send messages to the parent of an iframe.

The behavior is controlled by a new flag `messageParent`. The flag is `false` by default. If you set the flag to `true`, then it will post messages to `window.parent` if it exists.

To set the `messageParent` flag, you can modify the `<div class="doenetml-applet" >` in `pretext-html.xsl` to include the attribute `data-doenet-message-parent="true"`. When this is set, you should be able to receive the SPLICE events in the iframe parent.

A further step will be to tell Doenet to send the `SPLICE.getState` message, but only when in Runestone. I changed the default of the `allowLoadState` back to `false`, so it doesn't attempt to get the state and then timeout when receiving no response, as you experienced. When you know that Runestone is listening to `SPLICE.getState`, you can add the attribute `data-doenet-allow-load-state="true"` to `<div class="doenetml-applet" >`.

Duane


On Wed, Nov 12, 2025 at 5:37 PM Bradley Miller <br...@runestone.academy> wrote:
That seems to have moved us in the wrong direction.  I can see that there are to iframe resize messages then a long pause, then

-- 

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/CANX2AUZ7XZzTbzZD2pL2Fa6fXwHMUcJ7GeYMU_HY8PRmtECdkw%40mail.gmail.com.

Duane Nykamp

unread,
Nov 17, 2025, 10:43:06 PMNov 17
to prete...@googlegroups.com
Brad,

At least how I have it implemented, if I changed the default back to true, then Doenet would break everywhere that isn't in Runestone or doenet.org, such as in PreTeXt books not on Runestone. In those cases, Doenet would time out waiting for `getState.response`.

If Doenet weren't so slow, I suppose I could configure it to always send out `getResponse`, immediately render with the default state and continue with that if no `getState.response` were received. Receiving `getState.response` would cancel that initial render and rerender with the returned state. Maybe I could  test that setup, but I worry that Doenet's slowness would make that a bad experience in Runestone.

Do you know what others do when sending out `getResponse`? Do they go on their merry way if they don't receive a `getState.response`?

Duane


Rob Beezer

unread,
Nov 18, 2025, 6:17:04 PMNov 18
to prete...@googlegroups.com
The attribute

data-doenet-message-parent="true"

is now being set on

div.doenetml-applet

for a PreTeXt build that is meant to be hosted on Runestone. In the future,
maybe this will only happen if some sort of flag is set for the #interactive,
but right now it *always* happens, since this is still in a testing phase.

I think Brad knows how to test from here, but if there needs to be more on the
PreTeXt side, just let me know. "Regular" HTML builds are not affected.

Rob

On 11/17/25 14:35, 'Duane Nykamp' via PreTeXt development wrote:
> Brad,
>
> I released DoenetML 0.7.0-beta12 which makes it easier to send messages to the
> parent of an iframe.
>
> The behavior is controlled by a new flag `messageParent`. The flag is `false` by
> default. If you set the flag to `true`, then it will post messages to
> `window.parent` if it exists.
>
> To set the `messageParent` flag, you can modify the `<div class="doenetml-
> applet" >` in `pretext-html.xsl` to include the attribute `data-doenet-message-
> parent="true"`. When this is set, you should be able to receive the SPLICE
> events in the iframe parent.
>
> A further step will be to tell Doenet to send the `SPLICE.getState` message, but
> only when in Runestone. I changed the default of the `allowLoadState` back to
> `false`, so it doesn't attempt to get the state and then timeout when receiving
> no response, as you experienced. When you know that Runestone is listening to
> `SPLICE.getState`, you can add the attribute `data-doenet-allow-load-
> state="true"` to `<div class="doenetml-applet" >`.
>
> Duane
>
>
> On Wed, Nov 12, 2025 at 5:37 PM Bradley Miller <br...@runestone.academy> wrote:
>
> That seems to have moved us in the wrong direction.  I can see that there
> are to iframe resize messages then a long pause, then
>
> Screenshot 2025-11-12 at 3.27.12 PM.png
>
> One might think/assume that this was a timeout waiting for a SPLICE.getState
> message but I’m not getting that message.
>
> The console does show one troubling error related to this:
>
> Uncaught (in promise) TypeError: can't access property "defaultPageReady",
> MathJax.startup is undefined
> pageReadyhttps://runestone.academy/ns/books/published/PTXSB/interactive-
> doenetml-example-if.html <https://runestone.academy/ns/books/published/
> PTXSB/interactive-doenetml-example-if.html>:81
> defaultReadyhttps://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js
> <https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js>:1
>
>
>
>
> Brad Miller
> Professor Emeritus, Luther College
> Founder, Runestone Academy LTD
> Blog: http://reputablejournal.com <http://reputablejournal.com>
>
> Set up a time to meet <https://fantastical.app/bonelake-Gj2i/meet-with-
> brad> with me.
>
>
>> On Nov 12, 2025, at 10:15 AM, 'Duane Nykamp' via PreTeXt development
>> <prete...@googlegroups.com <mailto:prete...@googlegroups.com>> wrote:
>>
>> I released DoenetML 0.7.0-beta9, which changes the default save/load flags
>> to `true`. Since PreTeXt grabs `@latest`, it should automatically start
>> sending SPLICE events. (Fingers crossed.)
>>
>> On Tuesday, November 11, 2025 at 5:07:31 PM UTC-6 br...@runestone.academy
>> wrote:
>>
>> Thanks Rob,
>>
>> Duane and I figured out why I was not getting splice messages.  The
>> default is not to send them.  I believe the solution is going to be
>> for Duane to change the defaults on his side, as the splice events
>> will simply be ignored in a non runestone setting.
>>
>> Hopefully we can fully test soon.  Just waiting for the go ahead from
>> Duane.
>>
>>
>> Brad
>>
>> Brad Miller
>> Professor Emeritus, Luther College
>> Founder, Runestone Academy LTD
>> Blog: http://reputablejournal.com <http://reputablejournal.com/>
>>
>> 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 a topic in the
> Google Groups "PreTeXt development" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/
> pretext-dev/T6X8q-fT6eA/unsubscribe <https://groups.google.com/d/topic/
> pretext-dev/T6X8q-fT6eA/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to pretext-
> dev+uns...@googlegroups.com <mailto:pretext-
> dev+uns...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-
> dev/76F3BB0B-EBFC-44EC-B4BC-1C3B39B02455%40runestone.academy <https://
> groups.google.com/d/msgid/pretext-dev/76F3BB0B-EBFC-44EC-
> B4BC-1C3B39B02455%40runestone.academy?utm_medium=email&utm_source=footer>.
>
>
>
> --
> Duane Nykamp
> School of Mathematics
> University of Minnesota
> 202 Vincent Hall
> 206 Church St. SE
> Minneapolis, MN 55455
> www.math.umn.edu/~nykamp <http://www.math.umn.edu/~nykamp>
>
> --
> 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 view this discussion visit https://groups.google.com/d/msgid/pretext-dev/
> CANX2AUZ7XZzTbzZD2pL2Fa6fXwHMUcJ7GeYMU_HY8PRmtECdkw%40mail.gmail.com <https://
> groups.google.com/d/msgid/pretext-dev/
> CANX2AUZ7XZzTbzZD2pL2Fa6fXwHMUcJ7GeYMU_HY8PRmtECdkw%40mail.gmail.com?
> utm_medium=email&utm_source=footer>.

Duane Nykamp

unread,
Nov 18, 2025, 6:28:18 PMNov 18
to prete...@googlegroups.com
Great! There's no harm in having 

data-doenet-message-parent="true" 

set for all PreTeXt html builds. Since Doenet is always in an iframe in PreTeXt, that's always an appropriate flag. (Since other people are using Doenet not in an iframe, I didn't want to make that the default.) Having that flag set just means messages are sent where the containing window can see them. Not sure why anyone would want to listen to the messages, but there's no problem with sending them.

I'm toying around with having `getResponse` always sent so we don't need to have special attributes for Runestone. It doesn't seem to be slow like I feared.

Duane



To unsubscribe from this topic, visit https://groups.google.com/d/topic/pretext-dev/T6X8q-fT6eA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pretext-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/MTAwMDA0MS5iZWV6ZXI.1763507822%40pnsh.

Bradley Miller

unread,
Nov 18, 2025, 7:09:20 PMNov 18
to PreTeXt development
I agree.  You should just be listening for that message, and then change the state if/when said message arrives.  Otherwise it should just get the default state.


It looks like I should be able to test all of this tomorrow using tonights nightly CLI build.


Brad

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

Set up a time to meet with me.

Duane Nykamp

unread,
Nov 19, 2025, 4:05:33 PMNov 19
to prete...@googlegroups.com
DoenetML release 0.7.0-beta13 changes the default to always send `SPLICE.getResponse`, and it carries on with the default state if no response is received.

Bradley Miller

unread,
Nov 21, 2025, 1:15:53 PMNov 21
to PreTeXt development
OK, progress!!

I am getting SPLICE.sendEvent messages.  But they are not well formed and so they are causing crashes.  I’m not seeing any useful data in those events, and they don’t have the fields that are called out in the splice spec. See:  https://docs.google.com/document/d/1X6Vx6Em67t8Vp4Vecnmc-7OblVewJJKDFIJUrvRAvdc/edit?pli=1&tab=t.0

The problem on the DoenetML page of the sample book seems to send a sendEvent message every few seconds.

I get a sendScoreAndState message, but the data needed is nested too deeply it should be in event.data but it is actually in event.data.data

I am not seeing any requests to restore the state.

Brad

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

Set up a time to meet with me.

Duane Nykamp

unread,
Nov 23, 2025, 12:55:57 AMNov 23
to prete...@googlegroups.com
Brad,

That's great that we are getting closer!

I published a new version 0.7.0-beta14 where I attempted to make the SPLICE messages closer to the spec. I still include some fields that are not in the spec, as I need them to identify the state on beta.doenet.org. Does that work better now, or do you need more changes?

I wasn't sure what the "name" field was supposed to be in sendEvent, so I just put in the verb of the event.

Regarding getState messages, do you see the console.logs where it is sending them? Since those messages are sent right away, I miss them if I add the event listener after the DOM loads (for example, in a React.useEffect). But, if I make sure the listener is added right away (for example, using a React.useLayoutEffect), then the listener picks up the SPLICE.getState messages.

What sendEvent message is getting sent every few seconds? In order to track how long users are viewing each part of the page, it does send an isVisible event every minute. But, I can't think why it would be sending events every few seconds.

Duane



Bradley Miller

unread,
Nov 23, 2025, 7:07:40 PMNov 23
to PreTeXt development
Better!

I’m seeing all of the events now. 

The sendEvent is more readable.
 SPLICE.sendEvent | experienced | http://localhost/ns/books/published/PTXSB/doenet-velocity-if.html

I also stored the results of a report score and state.  The state is just a big json blob to me.


When I get the restoreState I respond but then things go south.  So we may have some work to do on getting you everything you need.  You can make the state object you pass along whatever you need it to be.

I’m getting a very nondescript “a” for the “activity_id”. If it isn’t present then we fall back to the URL. 


Ideally that would be the label from the problem in PreTeXt. But whether we can do that mapping up front and inject it into the code, or if we do it later and I just build a table that maps interactive and their URLs to the label needs further thought.




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

Set up a time to meet with me.

Duane Nykamp

unread,
Nov 23, 2025, 11:36:09 PMNov 23
to prete...@googlegroups.com
When I get the restoreState I respond but then things go south.  So we may have some work to do on getting you everything you need.  You can make the state object you pass along whatever you need it to be.

Hmm. On beta.doenet.org, I do the same thing, and just treat state as a blob. Then when receiving a getResponse `event`, I look up the saved state from the database and send back the message

            window.postMessage({
              subject: "SPLICE.getState.response",
              message_id: event.data.message_id,
              state,
            });
 
It's working to restore the state.

I’m getting a very nondescript “a” for the “activity_id”. If it isn’t present then we fall back to the URL. 

Ideally that would be the label from the problem in PreTeXt. But whether we can do that mapping up front and inject it into the code, or if we do it later and I just build a table that maps interactive and their URLs to the label needs further thought.

Right, default `activity_id` is "a" if nothing is provided.
 
It doesn't look like we have a way to set `activity_id` by putting a parameter in the `<div>`. Instead, it needs to be sent as the third `config` argument to `renderDoenetViewerContainer`, whose signature is

function renderDoenetViewerToContainer(
    container: Element,
    doenetMLSource?: string,
    config?: object,
)

The config object contains many options, but the relevant one here is `activityId: string`.

Another config option that may be of interest:
  • requestedVariantIndex: number;
    If not specified, then it will randomly choose one of the available variants (think seed for a rng). If you wish to control what variant students receive (e.g., if instructors want all students to receive the same variant), you can specify an integer.
Duane

Bradley Miller

unread,
Nov 25, 2025, 4:41:29 PMNov 25
to PreTeXt development
Good news!  We have doenet saving and restoring state via splice.

During drop-in today we discussed some possible solutions for getting the right Runestone id for the problem, and that is now working as well.

@Rob

In looking at the manifest for the test questions.  I like how the doenet question is structured, and I can easily grab the right id for it during manifest processing.   Not as much for the OpenDSA problem.   I think it would be nice to make them more consistent by wrapping them in a div with a data-component=“dynamic” ?? and an id that comes from the label on the interactive?

Right now I’m not doing anything with the doenet part of data-component=“doenet” for doenet problems but that seems like it might be useful down the road.   Maybe it should be @data-component=“splice” for anything that is going to be graded by splice ??

If I don’t find an @data-component, as a child of the div with @data-component=“dual” it looks like I would need to search for the iframe tag and grab the id from there.

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.

Bradley Miller

unread,
Nov 25, 2025, 8:07:58 PMNov 25
to PreTeXt development
Rob,

See previous response.  But now I am using the data-component=“doenet” to rewrite the URL for the iframe in the htmlsrc field.  Currently it is relative to the root of the html build.  But for Runestone it needs to be /ns/books/<document-id>/xxxxxx.html

Hmmmmm, there are so many places where I do this that it makes me wonder if you could fix all of this for a runestone build by adding the /ns/books/<document-id> prefix everywhere?  Not sure if that would be a good idea, but might prevent a lot of future case by case cleanups….

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,
Dec 2, 2025, 5:40:59 PM (13 days ago) Dec 2
to prete...@googlegroups.com
On 11/25/25 13:41, Bradley Miller wrote:
> @Rob
>
> In looking at the manifest for the test questions.  I like how the doenet
> question is structured, and I can easily grab the right id for it during
> manifest processing.   Not as much for the OpenDSA problem.   I think it would
> be nice to make them more consistent by wrapping them in a div with a data-
> component=“dynamic” ?? and an id that comes from the label on the interactive?

Following up on this, as part of a discussion in Drop-In this morning.

The #dynamic portion of a dual dynamic/static exercise requires a #statement,
which can only hold #p and exactly one #interactive, which needs a @label.
(The #p part could be broadened.) We assume the #interactive speaks SPLICE.

The HTML created for Runestone, as requested, now has:

div.ptx-runestone-container
div/ @data-component="splice" @id=[usual RS id]
iframe/ @src="....."

This is all experimental, and we have one serious test project coming up soon.
Finalization would likely happen over the summer at the earliest.

Rob

Reply all
Reply to author
Forward
0 new messages