Buggy behaviour in Runestone Parsons problems

24 views
Skip to first unread message

Sean Fitzpatrick

unread,
Oct 29, 2025, 3:16:42 PM (8 days ago) Oct 29
to PreTeXt support
We are encountering unusual behaviour with one of the Parsons problems in APEX, and I can't figure out what is wrong.

The question is here:
https://runestone.academy/ns/books/published/APEXPROTEUS/sec_optimization.html#APEX-PROTEUS-optimization-2-v1

I'll post the source below.

For some students, the blocks do not show up on the assignment page. When they view the question in the book, the blocks show up, and they're able to complete the problem.
But when they return to the assignment page, the check mark that should indicate a successful attempt is not there. It seems that the Runestone grader is giving credit, but students are understandably concerned.

When I tried it, the blocks did show up on the assignment page. I solved it, and the green check mark showed up.
But then I viewed the problem in the book. Two of the seven blocks were missing in the solution, and the problem had the yellow warning sign instead of the green check.

I clicked the reset button, the blocks came back, and I was able to solve again while viewing in the book.
But when I returned to the assignment page, the blocks were gone completely, and there was no indication that the problem had been attempted, successfully or unsuccessfully. This time, clicking reset did not bring back the blocks.

Here is the PreTeXt source for the problem:

  <exercise label="APEX-PROTEUS-optimization-2-v1" adaptive="yes" component="proteus">
    <title>Parsons Problem, Optimization</title>
   
    <statement>
      <p>
        Follow <xref ref="idea_optimization"/> to solve the following optimization problem:
        What are the dimensions of a cylinder of a given
        volume <m>V</m> so that its total surface area <m>S</m> is minimal?
      </p>

      <image width="33%">
          <shortdescription>A diagram of a right circular cylinder, labeling the radius and height.</shortdescription>
          <description>
            <p>
              A generic right circular cylinder is drawn without reference to a coordinate system.
              The cylinder is oriented vertically, with a circular base at the bottom.
            </p>

            <p>
              One side of the cylinder is labeled <m>h</m>, for the height,
              and a line segment is drawn from the center of the circular top to the edge,
              and labeled <m>r</m>, for radius.
            </p>
          </description>
          <latex-image label="proteus-img_right_circ_cyl">

          \begin{tikzpicture}[x=13pt,y=14pt,thick,scale=1.13]

          \begin{scope}[xscale=2]
          \draw (-1,0) arc (-180:0:1);
          \draw [dashed] (1,0) arc (0:180:1);
          \draw (0,2.5) circle (1);
          \draw (-1,0) -- (-1,2.5) (1,0)-- (1,2.5) node [right,pos=.5] {\(h\)};
          \draw (0,2.5) -- (1,2.5) node [above,pos=.5] {\(r\)};
          \end{scope}

          \draw [fill=black] (0,2.5) circle (1pt);

          \end{tikzpicture}

          </latex-image>
        </image>
    </statement>
    <blocks>
      <block order="1">
      <p>
        The quantity to minimize is the total surface area of the cylinder.
      </p>
      </block>
      <block order="2">
        <p>
          The <em>fundamental equation</em> is  <m>S= 2\pi r^2 + 2\pi r h</m>
        </p>
        </block>
      <block order="3">
      <!-- <choice> -->
      <p>
        The <em>constraint equation</em> is <m>V = \pi r^2 h</m>.  
      </p>
      </block>
      <block order="5">
      <p>
        Then, the <em>reduced fundamental equation</em> is <m> S(r) = 2\pi r^2 + 2\pi r \dfrac{V}{\pi r^2} = 2\left(\pi r^2 + \dfrac{V}{r}\right)</m>.
      </p>
      </block>
      <block order="4">
      <p>
        The domain of the reduced fundamental equation is <m> 0 \lt r \lt \infty </m>
      </p>
      </block>
      <block order ="5">
        <p>
        The <em>extreme value</em> of the reduced equation is <m>r = \left(\dfrac{V}{2\pi}\right)^{\frac{1}{3}}</m>
        </p>
      </block>
      <block order="6">
        <p>The cylinder of volume <m>V</m> with minimal total surface are area has radius
          <m>r =\left(\frac{V}{2\pi}\right)^{\frac{1}{3}}</m> and height <m>h=2r</m>. That is, the height of the cylinder is equal to its diameter.
        </p>
      </block>
    </blocks>
   
  </exercise>

Rob Beezer

unread,
Oct 29, 2025, 7:55:16 PM (8 days ago) Oct 29
to pretext...@googlegroups.com
I'm not seeing anything in your source that is alarming. @order is set to 5 twice, but that would only affect static/PDF.

You could scan the version in the manifest, which will go to the RS database, to see if there is anything glaringly amiss. I assume the image is fine in both renderings?

R

Sean Fitzpatrick

unread,
Oct 29, 2025, 8:13:34 PM (8 days ago) Oct 29
to pretext...@googlegroups.com
Yes, the image shows up fine. 

I wondered if the lack of a feedback element could be a problem, but I don't think it's mandatory. 

I'll fix the duplicated order.

--
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/MTAwMDAxMC5iZWV6ZXI.1761782112%40pnsh.

Oscar Levin

unread,
Oct 29, 2025, 8:33:21 PM (8 days ago) Oct 29
to pretext...@googlegroups.com
Any chance the label is the issue?  Like for example, there was the same label on another problem at some point?

Sean Fitzpatrick

unread,
Oct 29, 2025, 10:01:52 PM (8 days ago) Oct 29
to pretext...@googlegroups.com
Oh, that is definitely a possibility. 
There's been a lot of churn with the PROTEUS stuff. 

Or the label has changed in the text since I assigned the problem when I set up my course in August.

Andrew Scholer

unread,
Oct 30, 2025, 12:16:30 PM (7 days ago) Oct 30
to pretext...@googlegroups.com
Label does sound like the right direction.

If the label changed since you set up the assignment, that would explain the different views in different places. Assignment is loading an orphaned version of the problem that no longer appears in the text.

Your previous answer is stored locally in the browser, as well as in the RS database. So if the label stays the same but the blocks in the problem change, and one of those is loaded instead of the original problem, you can end up with a broken problem.

But that later issue would not explain the same person seeing different things in different places. I am pretty sure the rendering of both is leveraging the same code.

Andrew Scholer

unread,
Oct 30, 2025, 8:20:59 PM (7 days ago) Oct 30
to pretext...@googlegroups.com
Sean -

Check your console logs for a problem that is rendering wrong. Look for a string like:
Data from server: {"answer":"0_0-1_1-2_3_4_2-5_6_7_8_1-9_1-10_11_12_2-13_14_15_16_1-17_0"...

Split that at dashes. You should get a list of blocks:
['0_0', '1_1', '2_3_4_2', '5_6_7_8_1', '9_1', '10_11_12_2', '13_14_15_16_1', '17_0']

Each block has a list of lines separated with _ ending with an indent level (_0, _1, etc...)
Ignore the indent level. Look at the rest of the numbers... do they make sense? Are there gaps? Duplicates?

If so, go check the Runestone Discord... I might have a lead. Or I might have something unrelated.

Sean Fitzpatrick

unread,
Oct 31, 2025, 12:03:06 PM (6 days ago) Oct 31
to PreTeXt support
Here are some things I'm seeing in the console while on the assignment page. One is an error:

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'indent')
    at new b (parsonsBlock.js:29:60)
    at w.blockFromHash (parsons.js:1196:21)
    at w.blocksFromHash (parsons.js:1214:30)
    at w.loadData (parsons.js:702:22)
    at w.restoreAnswers (parsons.js:742:14)
    at w.repopulateFromStorage (runestonebase.js:456:18)
    at w.checkServer (runestonebase.js:388:30)

Is it complaining that the indentation is undefined? I suppose this is true, since we are only checking for order, and not indentation, as it isn't a coding exercise.

I'm also seeing (with my email redacted from the student id):

Data from server: {"answer":"0_1_0-2_3_0-4_5_0-6_7_0-8_9_0-10_11_0-12_13_0","source":"-","correct":true,"percent":1,"timestamp":"2025-10-31T15:49:46.501570+00:00","div_id":"APEXPROTEUS_5_APEX-PROTEUS-optimization-2-v1","sid":"removed","course_name":"Math1560_Fall2025","id":8270,"comment":"autograded","score":1} calling repopulateFromStorage

I don't see any gaps or duplicates.

None of the blocks are displayed on the assignment page. The question works correctly in the book.

I checked that the label used in the assignment matches the one in the textbook source.

When I view the question in the book, I get the same content in the 'data from server' message, but I do not get the TypeError.

Andrew Scholer

unread,
Oct 31, 2025, 12:33:51 PM (6 days ago) Oct 31
to pretext...@googlegroups.com
I don't suppose that there is a public course based on APEX Calc that has an assignment including that question?

Sean Fitzpatrick

unread,
Oct 31, 2025, 1:50:58 PM (6 days ago) Oct 31
to PreTeXt support
I don't think so. This would be in the PROTEUS version of APEX.
There is a template course that is being used for the PROTEUS project, but I don't think it's public.

I think it would be OK if we added you to it, though.

Andrew Scholer

unread,
Nov 1, 2025, 11:53:32 AM (5 days ago) Nov 1
to PreTeXt support
Reply all
Reply to author
Forward
0 new messages