How to specify the order of the blocks in a Parsons problem?

26 views
Skip to first unread message

Barbara Ericson

unread,
May 15, 2026, 12:54:36 PM (11 days ago) May 15
to PreTeXt support
I am trying to move to the PreText ebook but when I do group work I want everyone in the group to see the blocks in the same order.  How do I specify the block order?  

I see that there is a block order, but it doesn't seem to do that.  The order of the blocks isn't in that order and when I hit refresh the blocks move to a different order.

Barb Ericson

Mitch Keller

unread,
May 15, 2026, 12:56:42 PM (11 days ago) May 15
to pretext...@googlegroups.com
I think specifying the block order only impacts static formats (EPUB, PDF, etc.).

--
You received this message because you are subscribed to the Google Groups "PreTeXt support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-suppo...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-support/d7c113ee-8b30-41bd-9ac9-c8caf537aeafn%40googlegroups.com.


Sean Fitzpatrick

unread,
May 15, 2026, 12:57:04 PM (11 days ago) May 15
to pretext...@googlegroups.com
The block order is intended to specify an order for print and other static formats, I believe. 

In HTML the default is to randomize when the page loads. 

Maybe if you have an order specified you can do
<blocks randomize="no">?

--

Rob Beezer

unread,
May 15, 2026, 1:19:22 PM (11 days ago) May 15
to pretext...@googlegroups.com, Bradley Miller
Right, we use a @randomize attribute generally. I see it implemented for
horizontal Parsons, but not for "regular" Parsons.

As Sean and Mitch have noted the @order is designed for repeatable prsentations
in static formatis, like a PDF.

The *authored* order is the solution/correct order. No real reason we could
not have @randomize="no" which would respect a prescribed order via @order. I
guess I am assuming this would be supported by the Runestone JS.

This does seem like you want a feature as an *instructor* that might be
different from an *author's* intent in their source. Do we want the whole world
to see the same order, or isn't the randomization a key feature of the HTML
output? Should this be a course-by-course, exercise-by-exercise setting
(ducking as Brad comes his way).

Maybe experiment with the horizontal versions to see if they behave you want?
Then a PR could be made off of that similar situation.

Rob



On 5/15/26 09:56, Sean Fitzpatrick wrote:
> The block order is intended to specify an order for print and other static
> formats, I believe.
>
> In HTML the default is to randomize when the page loads.
>
> Maybe if you have an order specified you can do
> <blocks randomize="no">?
>
> On Fri, May 15, 2026, 10:54 a.m. Barbara Ericson <barb...@umich.edu
> <mailto:barb...@umich.edu>> wrote:
>
> I am trying to move to the PreText ebook but when I do group work I want
> everyone in the group to see the blocks in the same order.  How do I specify
> the block order?
>
> I see that there is a block order, but it doesn't seem to do that.  The
> order of the blocks isn't in that order and when I hit refresh the blocks
> move to a different order.
>
> Barb Ericson
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to pretext-suppo...@googlegroups.com <mailto:pretext-
> support+u...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-
> support/d7c113ee-8b30-41bd-9ac9-c8caf537aeafn%40googlegroups.com <https://
> groups.google.com/d/msgid/pretext-support/d7c113ee-8b30-41bd-9ac9-
> c8caf537aeafn%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-suppo...@googlegroups.com <mailto:pretext-
> support+u...@googlegroups.com>.
> CAH%2BNcPYSUzg4ynCBMnM0N9D0bUqTBwoNSFL99uA8TKs%3DNiFDtw%40mail.gmail.com
> <https://groups.google.com/d/msgid/pretext-support/
> CAH%2BNcPYSUzg4ynCBMnM0N9D0bUqTBwoNSFL99uA8TKs%3DNiFDtw%40mail.gmail.com?
> utm_medium=email&utm_source=footer>.

Andrew Scholer

unread,
May 15, 2026, 3:25:42 PM (11 days ago) May 15
to pretext...@googlegroups.com, Bradley Miller
I assume this is within the context of an assignment built as a peer assignment in Runestone?

If so, this sounds like a RS JS issue. In that context, the JS should pick one order for all group members. (But presumably not the same order for all groups or for the same problem outside that context.)

RS does provide for using a `data-order` attribute to set the order of Parsons blocks. But PTX doesn't have a way to trigger generating that order. @randomize="no" could be the trigger to generate that. But I agree that feels like an author level intervention, not an instructor level one.

Andrew


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

Barbara Ericson

unread,
May 18, 2026, 4:13:14 PM (8 days ago) May 18
to PreTeXt support
I want to make the order the same for all students since this is a group assignment.  I added line numbers too so that the students can more easily talk about the blocks by referencing the line numbers.  

Barbara Ericson

unread,
May 18, 2026, 4:14:44 PM (8 days ago) May 18
to PreTeXt support
The @randomize seems like a good solution to me.  I want all students to see the same order.  I will test the horizontal Parsons implementation of this.  

Rob Beezer

unread,
May 19, 2026, 1:38:42 PM (7 days ago) May 19
to pretext...@googlegroups.com
Discussed this with Brad at Drop-In today. An un-randomized Parsons problem is
implemented in Runestone already. So I will implement it for PreTeXt, in
parallel to what we do for horizontal Parsons (respecting @order attributes
meant primarly for static renderings). I will confirm here once completed.

This leaves open the author v.instructor question, and the groupwork behavior
question, which are relevant for the situation of a course hosted on Runestone.

Rob
> msgid/pretext- <https://groups.google.com/d/msgid/pretext->
> >     support/d7c113ee-8b30-41bd-9ac9-
> c8caf537aeafn%40googlegroups.com <http://40googlegroups.com> <https://
> > groups.google.com/d/msgid/pretext-support/
> d7c113ee-8b30-41bd-9ac9- <http://groups.google.com/d/msgid/pretext-
> support/d7c113ee-8b30-41bd-9ac9->
> >     c8caf537aeafn%40googlegroups.com?
> utm_medium=email&utm_source=footer <http://40googlegroups.com?
> utm_medium=email&utm_source=footer>>.
> >
> > --
> > You received this message because you are subscribed to the
> Google Groups
> > "PreTeXt support" group.
> > To unsubscribe from this group and stop receiving emails from it,
> send an email
> pretext-support/ <https://groups.google.com/d/msgid/pretext-support/>
> >
> CAH%2BNcPYSUzg4ynCBMnM0N9D0bUqTBwoNSFL99uA8TKs%3DNiFDtw%40mail.gmail.com <http://40mail.gmail.com>
> > <https://groups.google.com/d/msgid/pretext-support/ <https://
> groups.google.com/d/msgid/pretext-support/>
> >
> CAH%2BNcPYSUzg4ynCBMnM0N9D0bUqTBwoNSFL99uA8TKs%3DNiFDtw%40mail.gmail.com <http://40mail.gmail.com>?
> > utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "PreTeXt support" group.
>
> To unsubscribe from this group and stop receiving emails from it,
> send an email to pretext-suppo...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/
> pretext-support/MTAwMDAyOS5iZWV6ZXI.1778865558%40pnsh <https://
> groups.google.com/d/msgid/pretext-support/
> MTAwMDAyOS5iZWV6ZXI.1778865558%40pnsh>.
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-suppo...@googlegroups.com <mailto:pretext-
> support+u...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-support/
> f68aa807-0c67-4eab-9042-c183cffa72ecn%40googlegroups.com <https://
> groups.google.com/d/msgid/pretext-support/f68aa807-0c67-4eab-9042-
> c183cffa72ecn%40googlegroups.com?utm_medium=email&utm_source=footer>.

Barbara Ericson

unread,
May 19, 2026, 3:12:38 PM (7 days ago) May 19
to PreTeXt support
I tested the horizontal Parsons implementation of this and it worked the way I wanted.  The order didn't change when I hit the reset button.  I think the author should have the ability to say that the order should not be random if it is in a group assignment.  I could see that an instructor might also want to change the random default to a non-random version if they decide to have students work together on a page of the ebook or on an assignment.  They could make a copy of a problem and change it if they are the owner of the new version. 

Rob Beezer

unread,
May 19, 2026, 7:40:52 PM (6 days ago) May 19
to pretext...@googlegroups.com
Entirely for Brad. Sample book, first Parsons problem, 5.10.1.

Blocks are authored in (correct) order, 1,2,3,4,5,6, and are output into HTML in
that order.

Each has an @order attribute to specify a fixed (static) order, as in list below.

1 @order="2"
2 @order="3"
3 @order="1"
4 @order="5"
5 @order="4"
6 @order="6"

So we want third-authored block to appear first in fixed order. We want
first-authored block to appear second in fixed order. Etc.

So I make the @data-order attribute on pre.parsonsblocks, where a bunch of
other similar attributes go. The inverse permutation for the mathematicians.

data-order="3,1,2,5,4,6"

1. Only 4 blocks of 6 render.

2. I cannot make any sense out of the order. Tried zero-based indexing, with
no luck.

3. Result is as if @data-order were 2,4,3,5.

4. Good news: hit "Reset" and nothing changes.

I guess I could post this live if that helps.

Rob

Andrew Scholer

unread,
May 20, 2026, 10:03:58 PM (5 days ago) May 20
to pretext...@googlegroups.com
I was curious, so I stuck a data-order into a Parsons in a built copy of the sample book and checked out what happened in the debugger.

The RS code does expect 0 indexed. But it would be easy for the RS code to fix that up.

The other issues are related to the grouped distractors in that problem. If you specify an order for a Parsons without them, the RS code works fine (assuming the start index is matched up). But the RS code considers those blocks to be different. So the problem with six <block>s in PTX actually ends up with eight blocks in the JS. If you specify an order of "0,1,2,3,4,5,6,7", it works correctly.

So either PTX needs to produce an order where the distractors are accounted for, or RS needs to be updated to account for the grouping prior to applying the order. The RS side fix feels cleaner in theory, but there is a lot of code around orderings/distractors/adaptive behavior already.

Andrew

--
You received this message because you are subscribed to the Google Groups "PreTeXt support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-suppo...@googlegroups.com.

Andrew Scholer

unread,
May 22, 2026, 10:47:31 AM (4 days ago) May 22
to PreTeXt support
Barbara - do you care about explicitly setting the order of blocks? Or just that everyone gets a consistent ordering that is not the correct one?

Reporting back based on a conversation with Brad:

The RS code does in fact expect the numbering to include paired distractors. So

Block1
  Choice A
  Choice B
Block 2
Block 3
  Choice A
  Choice B
  Choice C
Block 4

Would need to specify an ordering that included 0-6 (not 0-4) where the things that are ordered are blocks without choices and the choices in blocks that have them. (And order choices consecutively.) Something like:

Block1
  Choice A   order=4
  Choice B   order=5
Block 2   order=6
Block 3 
  Choice A    order=2
  Choice B    order=3
  Choice C    order=1
Block 4   order=0

That feels overly complex and brittle. It also is pretty much impossible to get to from the existing markup (@order on each block, but not on choices) unless:
1) The choices are always in the authored order.
2) RS or PTX uses some consistent seed to randomize the order of choices.

Brad and I started wondering if @order is solving the right problem. It seems like an author or instructor has reason to care about a consistent ordering that is not the original. We aren't sure that means they want/need to to hand engineer a particular ordering.

What if @randomize="no" on a Parsons randomized the blocks automatically using a seed based on something consistent like the @label? With an optional @random-seed (or something) if an author really doesn't like the default random order.

Andrew

Rob Beezer

unread,
May 22, 2026, 11:22:12 AM (4 days ago) May 22
to pretext...@googlegroups.com
I have code ready to go that builds on the existing @order, which an author
should be setting for the static versions anyway.

In a block with #choice, I have just retained the authored order of the #choice,
since it does not seem so critical to randomize those.

The code is not brittle at all, since the markup is logical.

Rob
> support/MTAwMDA0Ni5iZWV6ZXI.1779234049%40pnsh <https://
> groups.google.com/d/msgid/pretext-support/
> MTAwMDA0Ni5iZWV6ZXI.1779234049%40pnsh>.
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> a337cd19-6446-4e1f-8a7d-54d3c119e6fcn%40googlegroups.com <https://
> groups.google.com/d/msgid/pretext-support/
> a337cd19-6446-4e1f-8a7d-54d3c119e6fcn%40googlegroups.com?
> utm_medium=email&utm_source=footer>.

Andrew Scholer

unread,
May 22, 2026, 11:40:22 AM (4 days ago) May 22
to pretext...@googlegroups.com
I was more worried about the authoring being brittle than the code.

Keeping choices in authored order does significantly reduce the complexity. 

But even authoring @orders on blocks feels like fiddly monkeywork. (Speaking as someone who has spent a lot of time over the last year authoring and editing these.) Why should an author have to set those for the static version? I don't think we expect an author to be trying to craft a pedagogically ideal shuffled order. Instead, we are asking them to be a manual RNG. So why not make it easier on them by letting an actual RNG produce a new order?

Rob Beezer

unread,
May 22, 2026, 11:46:42 AM (4 days ago) May 22
to pretext...@googlegroups.com
> I don't think we expect an author to be trying to craft a pedagogically ideal
shuffled order.

Yes, quality source material is always worth the investment. (Or else, you'd
just write your book in Markdown!)

And, to be practical, XSL does not have a good RNG that I've been able to find. ;-)

Rob

On 5/22/26 08:39, Andrew Scholer wrote:
> I was more worried about the authoring being brittle than the code.
>
> Keeping choices in authored order does significantly reduce the complexity.
>
> But even authoring @orders on blocks feels like fiddly monkeywork. (Speaking as
> someone who has spent a lot of time over the last year authoring and editing
> these.) Why should an author have to set those for the static version? I don't
> think we expect an author to be trying to craft a pedagogically ideal shuffled
> order. Instead, we are asking them to be a manual RNG. So why not make it easier
> on them by letting an actual RNG produce a new order?
>
> >         an email to pretext-suppo...@googlegroups.com <mailto:pretext-
> suppo...@googlegroups.com>.
> >
> >         To view this discussion visit https://groups.google.com/d/msgid/
> pretext- <https://groups.google.com/d/msgid/pretext->
> >         support/MTAwMDA0Ni5iZWV6ZXI.1779234049%40pnsh <https://
> > groups.google.com/d/msgid/pretext-support/ <http://groups.google.com/d/
> msgid/pretext-support/>
> >         MTAwMDA0Ni5iZWV6ZXI.1779234049%40pnsh>.
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "PreTeXt support" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> email
> > to pretext-suppo...@googlegroups.com <mailto:pretext-
> support%2Bunsu...@googlegroups.com> <mailto:pretext- <mailto:pretext->
> > support+u...@googlegroups.com
> <mailto:support%2Bunsu...@googlegroups.com>>.
> > To view this discussion visit https://groups.google.com/d/msgid/pretext-
> support/ <https://groups.google.com/d/msgid/pretext-support/>
> > a337cd19-6446-4e1f-8a7d-54d3c119e6fcn%40googlegroups.com
> <http://40googlegroups.com> <https://
> > groups.google.com/d/msgid/pretext-support/ <http://groups.google.com/d/
> msgid/pretext-support/>
> > a337cd19-6446-4e1f-8a7d-54d3c119e6fcn%40googlegroups.com
> <http://40googlegroups.com>?
> > utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to pretext-suppo...@googlegroups.com <mailto:pretext-
> support%2Bunsu...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-
> support/MTAwMDAyNi5iZWV6ZXI.1779463329%40pnsh <https://groups.google.com/d/
> msgid/pretext-support/MTAwMDAyNi5iZWV6ZXI.1779463329%40pnsh>.
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-suppo...@googlegroups.com <mailto:pretext-
> support+u...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-support/
> CACm44N8dZkVosvk%3DGe8wEUPCum68SFcKass5ymdDB8AAmNwrpw%40mail.gmail.com <https://
> groups.google.com/d/msgid/pretext-support/
> CACm44N8dZkVosvk%3DGe8wEUPCum68SFcKass5ymdDB8AAmNwrpw%40mail.gmail.com?
> utm_medium=email&utm_source=footer>.

Reply all
Reply to author
Forward
0 new messages