Forum Discussion
Locating randomised Radio and Check Mark buttons
Most of the courses I work on have Shuffle Answers on.
Of late I've needed to design my own buttons for specific scenarios, so they match the look of the slide.
When doing so I'm forced to turn randomise off as I have positioned the hidden buttons underneath my buttons (with related text), so that when a user REVIEWS their answers the ticks correctly match up with my new buttons.
I can't currently figure out how to locate where each button has been placed in the randomised order.
I thought maybe if I tried (for example)
Change state of PositionCHECKERone to OPTION2 (the state is called option2)
When the object intersects with the target object
-Radio Button 2
-PositionCHECKERone
At least I'd know that Radio Button 2 would be on row 1 for example.
But that causes the slide to not even start playing.
Does anyone have any thoughts?
5 Replies
- PalmPlumbNew to the Community
It sounds like you're dealing with a tricky issue due to the shuffle answers feature. One approach could be to dynamically track the randomized positions of your buttons using a variable or array that updates when the slide randomizes. This way, you can map the hidden buttons to their new positions without turning off randomization. As for the intersection method causing the slide to stop playing, it might be worth checking if the state change or object interaction is interrupting the slide's timeline—perhaps adding a condition to delay the state change until after the slide starts could help. Have you tried logging the button positions to see if that gives you a clue? I'd be curious to hear if others have a similar setup!
- DavidTaitSuper Hero
I'm not sure if it's possible to track the randomised positions, have you acheived this before? I'd be keen to know how you did it if you have!
- DavidTaitSuper Hero
That sounds like a mind-bending one to solve!
I don't think there's a way to read where something ends up once it's been positioned randomly, but I'm happy to be corrected.
Have you tried grouping your custom button and the text with the associated hidden button beneath it? You could then try selecting the whole group as the correct/incorrect option within the Question Editor and then use your Triggers to make the relevant hidden button visible depending on the answer that's been selected.
No guarantees it'll work, but off the top of my head it seems like it's worth a try.
- PhilMayorSuper Hero
You might be able to track the object IDs
But realistically for a sustainable solution I would rebuild as a freeform - NedimCommunity Member
I’m not sure what your current setup is, but it shouldn’t matter whether you’re using a graded question, a freeform interaction, or a fully custom layout. The real challenge is detecting the position of an object when the answers are shuffled.
To handle this properly, you’d need to use JavaScript and reference objects directly, so that elements like a checkmark or tick icon align to the correct option, ideally when it’s selected or represents the correct answer.
In the example below, I used a bit of JavaScript to align a single checkmark with whichever object is currently selected, even when the answer order is randomized. It's done using a simple script, without any triggers, just a single "Execute JavaScript" trigger that runs when the object is selected. Even if the objects are randomly scattered or repositioned on the slide, the code doesn't need to be updated. It will execute the same way.
I used a similar technique in E-Learning Challenge #506.Again, I’m not sure of your exact scenario. How many objects are involved or what your full requirements are but if the main goal is to detect an object’s position and align another object to it, then yes, this can definitely be done.
Related Content
- 6 months ago
- 2 months ago