Hello John,
Please try the following example whose XML file is attached and available at https://moodleformulas.org/course/view.php?id=78§ion=75 ↗ where you can also try it. The questions, or parts, appear one after the other. The JavaScript is quite simple.
Etc.