Skip to main content
russell_amat
Participating Frequently
September 15, 2020
Question

How do I reset all quiz variables to allow full course retake - Captivate 2019

  • September 15, 2020
  • 3 replies
  • 1762 views

Greetings all!

I have a course owner who wants to allow a student to take the final exam twice and if failed, retake the entire course again, including 2 more times at the final exam. I know I can not change the read-only system quiz variables so that option is out. There must be a JavaScript approach that I can use in an Advance Action script to reset everything as if a first time at the course, but am a developer, not a programmer. Any assistance would be greatly appreciated.

Unfortunately, because of the sensitive nature of the content I am unable to share the Captivate file.

THANKS and cheers,

Russ

3 replies

Participating Frequently
June 14, 2023

I have a problem with the review quiz button. After complete the assessment if i click the review button that is working fine, I have created the Retake course button manually which is resetting the course properly. Once I clicked the Review Quiz button the quiz is not reset I am unable to attend the quiz still that is showing the review mode. Is is possible to reset the quiz after click the Review quiz button. Please help us. Thanks.

 

Participating Frequently
June 14, 2023

Is it possible to reset the TOC? Please suggest the steps. Thanks

Paul Wilson CTDP
Community Expert
Community Expert
September 17, 2020

The JavaScript solution isn't too tough. Here is a basic solution that might be what you're looking for. https://youtu.be/NpkUMkut1lU

Paul Wilson, CTDP
russell_amat
Participating Frequently
September 17, 2020

Thank you, Paul, for your reply.

I have already viewed your YouTube video related to my problem. It is an interesting approach, and I'm in the process of developing a variation of that approach. My course owner wants the student to have 2 tries on the quiz before having to retake the course (your video deals with 1 fail and then retake course). So some modifications of your approach are necessary.

Thanks and cheers,

Russ

Lilybiri
Legend
September 16, 2020

Do you really want to do it the complicated way? If yes, will leave you to JS experts but I really think this could be done much easier with one advanced action. 

My proposal:

  1. Set the number of attempts to 4 (2x2).
  2. The attempt number will be stored in the quizzing system variable cpQuizInfoAttempts.
  3. That variable is increased when reaching the score slide, where you have the Retake button. At that moment all answers are reset, including all quizzing system variables. Instruct the learner to click the Retake button, but give them a warning about having the course restarting for the third attempt. You can use the system variables cpQuizInfoAttempts and cpQuizInfoPassFail to do so (same as in 4)
  4. You need to trigger one advanced (or shared) action On Enter of the First Question Slide, something like this:

                     IF cpQuizInfoAttempts is equal to 3 AND
                          cpQuizInfoPassFail is equal to 0
                                 Jump to slide 1
                     ELSE
                           Continue

I supposed that the content slides are before the quiz slides. The learner will be navigated to the first slide of the course (you can change the slide of course). After the content slide they'll reach the first quiz slide after having visited the content slides on attempt 3 (if attempt 2 was a failure) the learner will be able to retake the quiz. There is still one attempt left on failure, the Continue will act and the Retake button can be used for the last attempt. Make sure the option 'Allow backwards movement' is checked in Quiz Preferences, Settings to be able to navigate to a content slide which is before the quiz slides.

 

     

russell_amat
Participating Frequently
September 16, 2020

Thanks for the reply and work around information.  However, the point you make, "At that moment all answers are reset, including all quizzing system variables." does not occur until AFTER the learner clicks the Retake button. I added a text caption to all question slides the results slide and a failure slide (fails 2 tries on the quiz) that shows the following:

   cpQuizInfoAttempts = $$cpQuizInfoAttempts$$
   cpQuizInfoTotalCorrectAnswers = $$cpQuizInfoTotalCorrectAnswers$$
   cpQuizInfoPointsscored = $$cpQuizInfoPointsscored$$
   cpQuizInfoPassFail = $$cpQuizInfoPassFail$$
   cpInfoPercentage = $$cpInfoPercentage$$

 

None of of the variables were reset until I clicked the Retake Quiz button. The result is that I am unable to reset the question variables after the 2nd fail and before they retake the entire course.  Is there another non-JavaScript work around that will allow me to force the student to take the full course again after the 2nd quiz failure AND reset all of the question variables (except maybe the cpQuizInfoAttempts variable, but resetting that would also be nice)?

THANKS and cheers, Russ

Lilybiri
Legend
September 16, 2020

iI may have changed, used that approach in the past, but didn't test it in the most recent version. You can see an example in this blog:

http://blog.lilybiri.com/reset-knowledge-slide

It was a way to reset a quiz slide before the feature of KC slides appeared.

 

No problem. Let them click the Retake button but use a pop up to warn about the course needed to be viewed.

Move the action I provided to the first question. Make sure Backwards navigation is allowed in the quiz.

I have edited the previous answer to give this alternative for more recent veersions.