Using a timer across multiple pages issue

ewalsh-3688 Community Member Posts: 23 ☆ Roadie ☆
Hi Everyone,

I'm trying to create a reminder feature, where the learner is prompted every 40 minutes to take a break.

I've got the following objects added to my package, and whilst it performs as desired in Lectora Online preview mode, it doesn't work correctly when published to ReviewLink or my LMS. The correct behaviour is that the timer runs for 40 minutes, then when it's completed it opens a popup-page (if the variable is set to 1). What is happening when publishing is that the popup-page opens each time the learner moves to a new page.
  • Title > AU > OnShowPlay action object
    • Play 'TakeABreakTimer' object IF VAR 'BreakRemindersEnabled' = 1 ELSE Stop 'TakeABreakTimer' object
    • This should play the timer if it's stopped but only when the variable is set to 1. Otherwise, stop the timer from running (e.g. the variable is 0).
  • Title > AU > TakeABreakTimer timer object
    • Set to Countdown, 40 minutes. AutoStart is Disabled (the timer is started by the OnShowPlay action)
  • Title > AU > TakeABreakTimer > TimerAction action object
    • Done Playing 'TakeABreakTimer' Run Action Group 'TaBTimerRuntimeActions' IF VAR 'BreakRemindersEnabled' = 1 ELSE  Do Nothing
    • When the timer reaches 0, run the action group only if the variable is set to 1, otherwise do nothing.
  • Title > AU > TaBTimerRuntimeActions group - Contains 3 actions:
    • OnGroupStop - Stop 'TakeABreakTimer' Always
    • OnGroupDispMsg - Display Page 'Take a Break' in popup IF VAR 'BreakRemindersEnabled' = 1 ELSE Do Nothing
    • OnGroupPlay - Play 'TakeABreakTimer' IF VAR 'BreakRemindersEnabled' = 1 ELSE Do Nothing
My understanding is that once OnGroupDispMsg action is run, it should then wait for the popup to be closed before running the next action OnGroupPlay - if it doesn't it's not a problem as the action shouldn't then run for another 40 minutes anyway.

It's also my understanding that if I play a timer that has finished, it should effectively restart from the 40 minutes it was set to, is that correct?

I would welcome any critique on this issue, as to whether it's my logic of the actions, or if this is a fault (as Lectora Online preview is doing one thing, which is different when published).

Thanks in advance,

P.S. Not attached are the IF statements - they are all identical. Screenshots 2-7 are zipped as limited number of file uploads.


  • raungnaing
    raungnaing Community Member Posts: 35
    Hi Eoin,

    There seems to be an issue with playing/starting a timer in Lectora Online with an action on each page using OnShowPlay Timer action. It is setting the timer value to 0 on page switch and hence running the DonePlaying action which  pops up the take-a-break page.

    As a workaround for now you can set the timer to auto start and change the OnShowPlay action to OnShowStop if BreakRemindersEnabled Not Equal To 1.

    The pop up page does not stop the chain of actions in the group, so you really can't have restart timer action inline with the display popup action. You could add a button in the popup page to start the timer, but then you are relying on the user to click the button to start the timer before closing the popup page.

    To get around this, you can use a text block covering the entire page and have a link with an action to start the timer.

    So this is what I ended up with. Please take a look and see if it'll work for you:
    • Title > AU > TakeABreakTimer : Auto start set
    • Title > AU > OnShowStop action : Stop TakeABreakTimer - IF BreakReminderEnabled Not Equal To 1
    • Title > AU > > GroupResume (action group)
      • OnGroupHide (action) : Hide TakeABreakText
      • OnGroupPlay (action) : Play TakeABreakTimer - IF BreakReminderEnabled Not Equal To 1
    • Title > AU > TakeABreakText (Text block) : take up entire page; Initially Hidden is Set; Always on Top is Set
      • "Continue" link in the text block : Run Action Group GroupResume
        (you may also want to set opacity to about 90% so you can still see the page behind it)

  • ewalsh-3688
    ewalsh-3688 Community Member Posts: 23 ☆ Roadie ☆
    Thanks Robert. I haven't had a chance to test this yet, but I'll let you know how I get on.

    With regards to the timer being set to 0 on each page navigation, does this seem like a fault? I know that timers within Test sections don't get reset, so I wonder why mine gets reset.