Skip to main content

The PreTeXt Guide

Section 4.30 MyOpenMath Exercises

MyOpenMath is a hosted online homework system with hundreds of thousands of prebuilt questions.
In the web output, the MyOpenMath question will be embedded and interactive though not tied to any student or faculty account. In static output, a static version of the question will be included. Note that there are some limitations on which problems will display correctly in web and static output. Best practices are below.
To include a MyOpenMath question, you’ll first need an account on MyOpenMath.com
 1 
myopenmath.com
where you can browse the question libaries and look up the question ID. Then in your PreTeXt document include a <myopenmath> element with a @problem attribute with the MyOpenMath question ID.
To further control the web behavior of the embedded question, you can optionally include a @params attribute containing a comma-separated list of parameters, like maxtries=1,showhints=0, which can include:
maxtries
(default 0): Set to more than 0 to set the max tries on a question part before it gets disabled, and before a scaffolded question will move on to the next part.
hidescoreval
(default 0): Set to 1 to hide the "score: #" that displays after submitting a question. Score markers (check or x) will still show.
showansafter
(default 1, or maxtries if set): Set to have the answer show after this many tries. Set to 0 to have answers never show.
showhints
(default 3): Set to 0 to suppress help features, like hints and video buttons.
allowregen
(default 1): setting this to 1 will show a "Try another version" button after submitting.
submitall
(default 0): Set to 1 for all parts to get submitted, regardless of whether all parts are answered.
seed
(default random): To set a specific seed (1-9999) to force a specific version of the question to display
While almost all problems will display correctly in web output and many will display correctly in static output, it is recommended that you avoid using problems with the following features. Note, you can usually make a copy of the problem, edit out the offending feature, and use your substitute.
  • Scaffolded problems
  • Problems with extensive formatting (e.g., use of an html table to control display)
  • Lists containing images or line breaks (<br/>)
If you really love a MyOpenMath problem that does not display correctly, you might contact PreTeXt support; likely someone knows how to produce a conforming version.