Skip to main content
Participating Frequently
March 10, 2016
Answered

Create button to reset quiz

  • March 10, 2016
  • 2 replies
  • 6919 views

In Adobe Captivate 9, is there a way to create a button that emulates what the Retake Quiz button on the Quiz Results slide does? That is, it resets all the quiz questions to unanswered and allows the user to take the quiz again. In my project I wish to hide the Quiz Results slide but still have a way for the user to retake the quiz.

Correct answer TLCMediaDesign

If it is an HTML5 project, create an advanced action, execute this JavaScript, cp.resetQuizData(); then execute an action to jump to the first quiz slide.

2 replies

TLCMediaDesign
TLCMediaDesignCorrect answer
Inspiring
March 11, 2016

If it is an HTML5 project, create an advanced action, execute this JavaScript, cp.resetQuizData(); then execute an action to jump to the first quiz slide.

Participating Frequently
December 3, 2021

Hi there!
This is a pretty old post - but I am running into an issue with this javascript code here. I have a course with 5 modules within one scorm slide. Each module has a little quiz on the end that "unlocks" the next module if passed. I used lilibrys great tutorial here (http://blog.lilybiri.com/intermediate-score-slides-in-2020) to set the intermediate scoreslides up. Yesterday I created a "retake quiz" button following your javacode here - and the funny thing is - if applied only on the first intermediate score slide, it works fine. However I duplicated the intermediate score slide now and put it in each module at the end - of course properly renaming the variables and editing the advanced actions as necessary.

When I click (in html5 preview mode) now on the "retake Quiz" button, it takes me back to the first question slide as expected, but the answeres given before are still there and I can't make any changes (being the learner of course)... Where is my thinking mistake?

Thank you so much!

Participating Frequently
December 3, 2021

Not completely clear to me. Both the "cp.resetQuizData(); " and the Retake button will reset all quiz answers. AFAIK it is not possible to reset only part of the questions. But you seem not to have reset any questions. Do you have intinite attempts on Quiz level? You could debug by displaying the system variable cpQuizInfoAttempts on all slides (set it on first slide and show for rest of project). Is that variable increasing when you click your custom Retake button?


Hey Lilybiri!
Thank you for your answer! To make things clearer (sorry) - the retake quiz button is a manually created one triggering the advanced action with the javascript code mentioned in this thread. Is this structure of mine so unique that it creates so many issues, or am I just doing it all wrong in the structure (modul1 - quiz1, modul2 - quiz2, ...etc)? Resetting part of the quiz would be perfect, but I think I can do with resetting all quizzes too...

And you are right, nothing is being reset, not in any of the 5 quizzes when I click on the (manually created) retake quiz button.

 

I tried your debugging and the counter of the quizInfoAttempts stays at 1 no matter how often I click on (manually created) retake quiz button.

I use the same two advanced actions in all question slides within one module (see Quiz_Modul1_Correct Screenshots).

For the (manually created) retake quiz button I also screenshotted my advanced actions (see Quiz_RetakeModul1).

 

I am wondering if dividing up the 5 modules and combining them with the scorm combining program would be better??

Thank you very much!

best

- Reinhard

Lilybiri
Legend
March 11, 2016

I don't know a workaround, but can you explain why you want to hide the Quiz results slide? You can customize it as much as you want, you need to keep the Continue button but can make it 'invisible' by changing the look and label of that button. All fields with scoe results can be unchecked in Quiz Preferences, you can add static objects etc. This workaround is not an 'emulation' but maybe it will do the trick?

gerkowAuthor
Participating Frequently
March 11, 2016

I want to create branching based on pass/fail and number of attempts. Clicking Continue on the Results slide allows the user to end the course without having passed the quiz. Maybe hiding the Continue button based on conditions will work. Thank you.

Lilybiri
Legend
March 11, 2016

Not hiding, make it invisible (delete the label, choose a completely transparent button). As David (TLCMediaDesign) mentioned; his perfect answer will not work for SWF output probably.