-
-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple choice #1019
Multiple choice #1019
Conversation
I've been thinking it would be nice to have a replacement for |
There is some discussion of this at #843. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks good. I am not sure how useful the values
option is for this in general. Perhaps you have a particular usage for PTX in mind with that. The main objective with radio buttons with the values
option was to give something more meaningful that can be displayed in the past answers. For popups that isn't really an issue.
One thing that I would like to do with the parserPopUp.pl macro is to stop using a native browser select, and use a javascript implementation. The advantage of doing that would be that you could actually have math equations in the drop down.
ca07ce9
to
e703f45
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One other clean up item.
e703f45
to
b5eed76
Compare
I think this looks ready to go now. @drgrice1, ready to merge? |
Yeah, this can be merged. |
I added a comment to the release notes about this being a breaking change for some problems. |
This was primarily meant to address #1017, so that now when there is a PopUp and a nonegative integer is declared as the answer, you have the same behavior as with RadioButtons where it is assumed to be an index, even when it matches one of the actual answers. But you can use
noindex => 1
to override that.Several other changes happen too. An HTML
option
(inside an HTMLselect
) can havevalue
andlabel
attributes. If there is text content inside theoption
, that is used as the default for thevalue
andlabel
attributes. If both attributes are specified, I think there is no significance to the text children of theoption
. Anyway, in the manner of @drgrice1's revision toparserRadioButtons
in the last release (or the one before?) this now carefully separates the option text, option value, and option label. The details are slightly different owing to how label means something different here. But much of this was copying chunks fromparserRadioButtons.pl
and then here and there adjusting.I'm updating the PTX output to be more semantically correct. It will require new things on the PTX side, but that should be OK.
Lastly, I thought it would be convenient to make a parent
parserMultipleChoice.pl
file to load the four multiple choice macro files we have now.