Skip to content

Commit

Permalink
Merge pull request #2681 from QuizandSurveyMaster/CU-86cwma7xq-fix-co…
Browse files Browse the repository at this point in the history
…unt-up-timer-in-legacy-timer

Fix legacy timer count up
  • Loading branch information
zubairraeen authored Oct 17, 2024
2 parents 955f858 + 312072a commit 61e7e83
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion js/qsm-quiz.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,12 @@ var qsmTimerInterval = [];
}
var secondsRemaining = qmn_quiz_data[quizID].timerRemaning;
var secondsConsumed = qmn_quiz_data[quizID].timerConsumed;
jQuery(document).trigger('qmn_timer_consumed_seconds', [quizID, qmn_quiz_data, qsm_timer_consumed_obj]);
if (localStorage.getItem('mlw_time_quiz' + quizID) != null ) {
secondsRemaining = (parseFloat(qmn_quiz_data[quizID].timer_limit) * 60) - secondsConsumed + 1;
if(qsm_timer_consumed_obj.qmn_count_upward_status){
secondsConsumed = qmn_quiz_data[quizID].timerConsumed - 1;
secondsRemaining = (parseFloat(qmn_quiz_data[quizID].timer_limit) * 60) - secondsConsumed;
}
if(secondsRemaining < 0) {
secondsRemaining = 0;
}
Expand Down

0 comments on commit 61e7e83

Please sign in to comment.