Skip to content

Commit

Permalink
Merge pull request #2407 from QuizandSurveyMaster/CU-85zu18kq4-advanc…
Browse files Browse the repository at this point in the history
…e-timer-strategic-update

Fixed single page quiz timer
  • Loading branch information
zubairraeen authored Nov 28, 2023
2 parents 1144fc9 + b4991aa commit 37d5313
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions js/qsm-quiz.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,12 @@ var qsmTimerInterval = [];
}
var secondsRemaining = qmn_quiz_data[quizID].timerRemaning;
var secondsConsumed = qmn_quiz_data[quizID].timerConsumed;
if (localStorage.getItem('mlw_time_quiz' + quizID) != null ) {
secondsRemaining = (parseFloat(qmn_quiz_data[quizID].timer_limit) * 60) - secondsConsumed + 1;
if(secondsRemaining < 0) {
secondsRemaining = 0;
}
}
var display = QSM.secondsToTimer(secondsRemaining);
var systemTime = new Date().getTime() / 1000;
systemTime = Math.round(systemTime);
Expand Down

0 comments on commit 37d5313

Please sign in to comment.