diff --git a/mod/quiz/module.js b/mod/quiz/module.js index 14bb6f68e43..c3aa3824884 100644 --- a/mod/quiz/module.js +++ b/mod/quiz/module.js @@ -95,14 +95,8 @@ M.mod_quiz.timer = { update: function() { var Y = M.mod_quiz.timer.Y; var secondsleft = Math.floor((M.mod_quiz.timer.endtime - new Date().getTime())/1000); - - // If this is a preview and time expired, display timeleft 0 and don't renew the timer. - if (M.mod_quiz.timer.preview && secondsleft < 0) { - Y.one('#quiz-time-left').setContent('0:00:00'); - return; - } - - // If time has expired, Set the hidden form field that says time has expired. + + // If time has expired, set the hidden form field that says time has expired and submit if (secondsleft < 0) { M.mod_quiz.timer.stop(null); Y.one('#quiz-time-left').setContent(M.str.quiz.timesup);