Change parserPopUp? #782
Replies: 9 comments 1 reply
-
I think that this would be an improvement, but as you say it has implications for existing problems. I wouldn't object if it causes some existing problems to effectively have two placeholder options, because it wouldn't make them unusable, and it's easy (though possibly tedious) to fix them. A quick grep of the OPL shows
These could theoretically be updated in an automated way, but there are many others that create an array and then pass that to A couple of thoughts/suggestions:
|
Beta Was this translation helpful? Give feedback.
-
I was thinking to make the placeholder Out of laziness I like |
Beta Was this translation helpful? Give feedback.
-
Although I like the idea, I think it would be too disruptive to change the syntax of the array that is sent to What about keeping the syntax the same (so users still have to manually input the placeholder as the first item in the list), but then use the method to disable the first entry in the list to make it not selectable after it has been changed? I am thinking about something like |
Beta Was this translation helpful? Give feedback.
-
I'm not suggesting changing the syntax. It would still be What you suggest would actually break the existing problems that don't manually write a placeholder. If the correct answer is the 0th option, those problems would break. |
Beta Was this translation helpful? Give feedback.
-
You suggested changing the array ref from I don't think we should try to guess what the possible place holders people have chosen to use are, instead we should just assume that the 0th entry is the place holder (and this by default makes it configurable). I think this will break less cases, as I think it is probably more common people are using the first entry in the array as a place holder, so we should just treat it as such, and in the case they aren't, those few problems can disable that. I did not think about the case that someone would choose the 0th option as correct. We could deal with this case, if the correct option is 0, then don't disable the first item since it needs to be selectable. |
Beta Was this translation helpful? Give feedback.
-
Even if the 0th options is not the correct option, it still break things to have I'm suggesting that if you have an exercise with
And it's not great but also not terrible to have it like that. Or it could be coded to recognize a few select phrases like We are wrestling with how the actual options and the placeholder are different things, and imho we have mangled them together and have a legacy of that to deal with. I think something should change, because right now there is no way (aside from human eyes on the code) to definitively discern if the 0th entry is an actual option or a placeholder. So when something like PreTeXt wants to know the actual options for the MC exercise, it has to assume the 0th entry is an option, which is leading to badness. |
Beta Was this translation helpful? Give feedback.
-
Since |
Beta Was this translation helpful? Give feedback.
-
I might be saying "change Is it clear the new behavior would also be about disabling option 0? Like here? |
Beta Was this translation helpful? Give feedback.
-
I can live with Davide's suggestion to make a new function. The new one should probably replace the old one in most places where the old one is used. But that will require a lot of manual editing of problem files and take time. Before I go through with it, does anyone want to make any more suggestions for the name? |
Beta Was this translation helpful? Give feedback.
-
Authors (including me) have written lots of exercises with something like:
where the
'?'
is a hack to make the select element's initial value not actually be one of the intended choices.I'd like to change it so the author would write:
and using a technique like this there would just always be a placeholder initial value for the select. That value could be '?' but configurable as an option to pass to PopUp for an author who prefers something like "Choose one:".
The problem would be all those exercises that are already coded with a
'?'
. Or worse, those with something like a'Choose one:'
.Beta Was this translation helpful? Give feedback.
All reactions