Getting a weird "info"

Minimal example:

<selectFromSequence name="a" from="1" to="2"/>
<selectFromSequence name="c" from="1" to="2" exclude="$a"/>

gives Information that “have not implemented unique variants of a selectFromSequence with non-constant exclude”.

But we’ve used this technique in multiple problems, and it does work as expected. Can you get rid of the misleading info, because it seems to me that it has actually been implemented?

DoenetML is not smart enough to determine the unique variants available when any of the sequence parameters are references. So, the exclude="$a" is what breaks it here. (The calculation for the unique variants happens before the document is created, so it isn’t easy to figure out what $a represents.) For this reason, it cannot determine that there are only two variants: ($a,$c) = (1, 2) and ($a, $c) = (2,1).

Since DoenetML failed to enumerate the variants, it just falls back to randomly generating the variants, creating the default 100 variants. If you look at the variant selector, you’ll see that there are variants a, b, …, cv, which are the first 100 “letters” of the alphabet. By chance, variant a and variant b happen to be different, but the remaining 98 variants are all repeats.

I don’t expect that the info message “have not implemented unique variants of a selectFromSequence with non-constant exclude” to be comprehensible, especially since the whole concept of unique variants is an advanced idea that we try to shield authors from as long as possible. That’s just placeholder text until we have some documentation explaining what unique variants are. Then, we can link to that page so that an author at least has a fighting chance of knowing what the info is referencing.

I made an issue to create variants documentation that we can link to in these info messages.

Ah gotcha - I understand the message now. I had noticed that there were 100 variants for the 2 options, but I just paged through them to verify that the select was working to choose different numbers without thinking too hard about why there were 100 in the first place!