Skip to main content
Participating Frequently
August 24, 2022
Question

Reset user variables back to 0 at end of course

  • August 24, 2022
  • 1 reply
  • 470 views

In the course i'm building we have a requirement to used forced navigation at the end of each slide to ensure the users have listened/watched it in it's entirety. But, on reentry to the slide, either by using the back button or closing the course and reentering it. All of this functionality works fine. 

 

We're now working on adding another condition, that, if the user attempts and fails the course 3 times, they must retake the course as if it's their first time taking it (watching each slide in its entirety). 

 

I am a shared action on entry and on exit using v_slidevisited_## to update the next button logic on each slide. I have tried "Assigned v_slidevisited_## to 0" in an advanced action before "Jump to Slide" on the Restart Course button  on the resutls slide as well as an on entry decision to the 3 attemps failure logic. Neither are working. What am i doing wrong?

 

Example of the results slide advanced action below.

This topic has been closed for replies.

1 reply

Lilybiri
Legend
August 24, 2022

Can you please post the complete action? Use the Preview window, because that will show a lot more from the action. It can be opened  by the first button in the top right control panel in the Adv. Actions dialog box. It is necessary to see the full logic of this multi-decision action.

Which event is triggering this action?  Is it the On Enter event for the Results slide or the Failure action? I presume the first, because for a failure action you wouldn't need a double AND condition.

You talk about two shared actions as well, please post also a preview. You use the On Enter event, I am always very hesitant however to use the On Exit event for a slide. Was that necessary to be used? 

Five variables are reset, do you have only 5 slides with forced navigation?

Participating Frequently
August 24, 2022

I have tried the logic in 2 places - 1 at a time each. First, I added it to "On Success" the button "Restart Course" on the results slide. So when the button is clicked, it should assign 0 to all of the v_slidevisited_## variables, then "jump to Slide #".  (shown below with "button" in red"

 

When that wasn't working, I added it to the results slide OnEnter. So that when the user attempts and fails the quiz 3 times, and the appropriate states, audio, and button appears - it will also go ahead and reset all of those slide variables (v_slidevisited_##) - shown below with "on enter" in red. 

 

Hope that makes more sense? 

I have also included the next button logic in case you need to see that. 

So when the user completes the slide, On Exiting the slide variable will be assigned a 1 value. 

On slide Entry - On Entry will decide if the delayed or visited next button should show.

Participating Frequently
August 24, 2022

Sorry, for your last question, No I have 39 slides, I only put in a few to test, because in test i'm hiding most of the slides since it's an hour long course.