Forum Discussion
How to set quiz slide/s in navigation incomplete if learner has not answered question
Thanks Nedim,
I was hoping there would have been an inbuilt way using the triggers. I will upload the test exam here.
Sorry for the delayed response. I'm not as active in this community as I used to be.
Please find the attached Storyline file and let me know if it works as intended for you.
I've added the main JavaScript functionality in an Execute JavaScript trigger on the Slide Master. Then, on each question slide, I call a single function when the user clicks the Next button — under the condition that at least one radio button is selected.
Additionally, I included a trigger on each question slide to hide the warning message once any radio button has been selected.
Let me know if you need further clarification on how the JavaScript works. In short, it tracks the current slide using a custom variable "slideID" I've added to the project. This ensures that tick marks are only activated for "visited" slides where the JavaScript is called, and remain hidden on all others.
- CiaranWhelan-2a4 days agoCommunity Member
Thank you very much Nedim for looking at this. I assume that I will need to add this to each of the quiz questions in the question bank as well? In these exams, I will have a bank of 120 questions and then pull questions automatically from 3 categories.
- Nedim3 days agoCommunity Member
Yes, I understand it's a bit of a hassle to add this to each question slide, but it's a necessary step to ensure everything functions properly. I considered moving all the JavaScript to the Slide Master, but the issue is that the Slide Master can't reliably detect all the radio buttons on each individual question slide. As we've seen, your interaction depends heavily on the states of those buttons—specifically, to identify questions that have been answered and to show a warning message if they haven't. I could have created another True/False variable, such as "warningShown", and dynamically updated it within the code. However, that still wouldn’t have eliminated the need to add an extra one or two triggers on each question slide. Either way, some modification to your original setup was going to be necessary.
If there were a single button or element we could use consistently across all slides, we could potentially run the logic from the Slide Master alone. Unfortunately, because each slide has unique elements (radio buttons), this workaround isn't fully effective in this case.
Copying and pasting the triggers shouldn’t take more than 30 minutes, and in the end, you'll have a reliable solution that works as intended.- CiaranWhelan-2a3 days agoCommunity Member
Oh, it is no hastle at all. I am just very apreciative of what you have shown and taught me.
To confirm, is this all I need to do in future? i.e., add the 2 "Execute JavaScript" triggers on the master slide with the custom JS you have coded up, and add the slideID variable to the master slide, then add "Execute JavaScript" trigger to each of the question slides?
I will try replicate this to another course i am doing so that I can practice this new function.
Were there any other things you added to the course that I had not picked up yet?
Related Content
- 9 months ago
- 2 months ago
- 6 months ago