Index: lams_tool_doku/web/pages/learning/learning.jsp =================================================================== diff -u -r0ebaba46f0ce87b5138e8e70cc1965887c1c7787 -r4964ab69222479e65618ae30e4dde3536163735a --- lams_tool_doku/web/pages/learning/learning.jsp (.../learning.jsp) (revision 0ebaba46f0ce87b5138e8e70cc1965887c1c7787) +++ lams_tool_doku/web/pages/learning/learning.jsp (.../learning.jsp) (revision 4964ab69222479e65618ae30e4dde3536163735a) @@ -144,20 +144,19 @@ if (input.clearTimer == true) { // teacher stopped the timer, destroy it $('#countdown').countdown('destroy').remove(); - } else { + } else if (typeof input.secondsLeft != 'undefined'){ // teacher updated the timer var secondsLeft = +input.secondsLeft, counterInitialised = $('#countdown').length > 0; if (counterInitialised) { // just set the new time $('#countdown').countdown('option', 'until', secondsLeft + 'S'); - } else if (secondsLeft){ - if (timeLimitExceeded) { - // teacher gave extra time, reload to writable Etherpad - location.reload(); - return; - } + } else if (timeLimitExceeded && secondsLeft > 0){ + // teacher gave extra time, reload to writable Etherpad + location.reload(); + return; + } else { // initialise the timer displayCountdown(secondsLeft); }