Multiple choice/select questions: scripted access to CURRENT order on page?

carlfink
carlfink Community Member Posts: 971 ✭ Legend ✭
I'm working on tests that must, as a policy, randomize the order of responses to multiple choice and multiple select questions. If I want to add audio files of reading the responses aloud, obviously I want those to play in the order that the responses are currently listed in. I would also like to highlight each item as its audio file is read. That is, as the first possible response is read, that item is outlined in green. When item 2 is read, that item becomes highlighted and item 1 is not.

None of this (that I can see) can be done with Actions because there is no way to make the actions fire in the right order. I could easily have the first item in the question as written read, then the second, and so forth, and have actions fire when the last audio file ends, but in this case that would involve reading in the wrong order, e. g. visibly it might read 3, 1, 2, 4.

I am reasonably comfortable scripting (although JavaScript isn't my "native language"), but I thought I'd ask: is there any obvious way to find the order that Lectora scrambles the responses into? Otherwise I have to write scripts to order the readings/highlightings based on the Y-axis positions of the responses. Not difficult, but if there's built-in support (e. g. a Trivantis-defined array showing the current order), I'd rather use that.

Thank you.

Comments

  • smiller7502
    smiller7502 Community Member Posts: 181
    If this doesn't exist, it should. It would be great if we could "attach" things to the responses. In addition to the audio issue Carl describes, we frequently want to show a green check mark next to the correct answer and red X's next to the incorrect answers, and this becomes challenging when the responses are randomized.

    Carl, for your audio issue: You could initially hide the responses and then show them one at a time, which would let you time the audio with the appearance of the responses on the screen. The responses would still show up in random order visually, but obviously the timing of their appearance wouldn't be random; don't know if that's good enough for you or not, but it's all I've got. Hopefully somebody smarter than I will have a better idea.
  • smiller7502
    smiller7502 Community Member Posts: 181
    I've just been working on some multiple-choice questions myself, and I have some additional requests. (Sorry to piggyback, Carl, but they're very similar to your request.)

    For multiple-choice questions, I want to have options to:
    • Show an image indicating the correct answer (a green check mark, for instance) on process question, even if the responses are randomized.
    • Include pictures with each response that can be clicked to choose that response. (Yes, I know how to add images to a multiple-choice question, and at least the images move with the responses when the responses are randomized. But learners can't click the images to answer the question.)
    • Name or number the responses so I can read the question variable more easily than having to match the entire text of each response.
    • Have a separate variable for each response indicating whether the learner selected that response or not, or change the question variable to a string of name-value pairs.
  • aoswald
    aoswald Community Member Posts: 124 ♪ Opening Act ♪
    I'm interested in using images as choices in a multiple response question.  Has that been answered somewhere?  I have the images loaded but I want to hide the choice button and just click on the images.  Is that doable?

     

    thanks in advance
  • carlfink
    carlfink Community Member Posts: 971 ✭ Legend ✭
    @Art Oswald, the simple thing to do would be to make the text label for each response the same size and shape as the image you want to use, then place it on top of the image and make it invisible. From the user's POV, they click on the image and the right thing is selected.

    You'd have to leave the radio buttons visible, though, so they could see what item is currently selected. Otherwise you'd have to write JavaScript or something to create some other kind of visual indicator, such as drawing an outline around the selected option.

    Edit: maybe a drag-and-drop question would work better for you?