How to scramble a list of problems

I have a list of problems that have no need to go in a particular order. In fact, I’d like to scramble them so students don’t just memorize a pattern (the first one is always linear, the second is always exponential, and so on).

I’ve tried giving each of my problems a name, then making a <select> that selects my problems. However, I get an error that says:

Invalid children for <math>: Found invalid children: <problem>

Problem List Issues

<shuffle>ought to do this if I am understanding your request correctly.

<problems>
  <shuffle>
    <problem></problem>
    <problem></problem>
    <problem></problem>
  </shuffle>
<problems>

The way Anurag suggested is the way to do it. The <problems> is optional depending on how you want them to look.

You could use a <select> as well to randomly order them, but it is typically used if you want just a subset of them (or to have some repeated, with withReplacement set). You just need to put the problems inside options:

<select numToSelect="3">
   <option><problem></problem></option>
   <option><problem></problem></option>
   <option><problem></problem></option>
</select>

You could surround this with a <problems> as well.

Both of these options work! For some reason I was thinking that “shuffle” should be an attribute of problems rather than a separate tag. I ended up going with the select option so that I could grab a random subset of problems. I had tried that before, but didn’t know about the <option> tag requirement.