diff --git a/modules/Quiz/resources/quiz.js b/modules/Quiz/resources/quiz.js index 9a022af6fd..d0a8b2f55e 100755 --- a/modules/Quiz/resources/quiz.js +++ b/modules/Quiz/resources/quiz.js @@ -275,21 +275,20 @@ var _this = this; if(data.objectType === "KalturaAPIException"){ _this.KIVQModule.errMsg('Error', data); + mw.log("Quiz: retakeSuccess Error"); }else{ _this.KIVQModule.sendIVQMesageToListener("QuizRetake"); // reset quiz and KIVQModule this.destroy(); this.KIVQModule.destroy(); this.KIVQModule.setupQuiz().then(function(){ - // new quiz data is now loaded - proceed with CPs loading - _this.KIVQModule.getQuestionsAndAnswers(function(){ - setTimeout(function () { - _this.embedPlayer.stopPlayAfterSeek = false; - _this.embedPlayer.seek(0,false); - _this.ivqHideScreen() - },50); - }) - }) + mw.log("Quiz: retakeSuccess setupQuiz"); + setTimeout(function () { + _this.embedPlayer.stopPlayAfterSeek = false; + _this.embedPlayer.seek(0,false); + _this.ivqHideScreen(); + },800); + }); } }, @@ -1084,7 +1083,18 @@ + '/' + $.cpObject.cpArray.length + '')); $(".ftr-right").html(gM('mwe-quiz-next')).on('click', function () { - _this.KIVQModule.continuePlay(); + mw.log("Quiz: Skip/Continue clicked reviewMode"); + if(_this.isReflectionPoint($.cpObject.cpArray[questionNr]) && !$.cpObject.cpArray[questionNr].isAnswerd ) { + mw.log("Quiz: reflection point - submit"); + $(this).off(); // disable 2nd click to prevent double submission + // only on reflection point - when clicking on continue - submit the question and wait as all other questions + _this.KIVQModule.submitAnswer(questionNr,0); + setTimeout(function(){ + _this.KIVQModule.continuePlay(); + },_this.postAnswerTimer); + }else{ + _this.KIVQModule.continuePlay(); + } }).attr({'tabindex': 6.3, "role" : "button"}).on('keydown', _this.keyDownHandler); } else { $(".ftr-left").append($('
' + gM('mwe-quiz-question') + ' ' + this.KIVQModule.i2q(questionNr) @@ -1119,8 +1129,9 @@ }).on('keydown', _this.keyDownHandler).attr('tabindex', 5).attr('role', 'button'); }else if(!_this.KIVQModule.canSkip && ( $.cpObject.cpArray[questionNr].isAnswerd || _this.isReflectionPoint($.cpObject.cpArray[questionNr])) ){ $(".ftr-right").html(gM('mwe-quiz-next')).on('click', function () { - if(_this.isReflectionPoint($.cpObject.cpArray[questionNr])) { - mw.log("Quiz: reflection point - Skip/Continue clicked"); + mw.log("Quiz: reflection point - Skip/Continue clicked"); + if(_this.isReflectionPoint($.cpObject.cpArray[questionNr]) && !$.cpObject.cpArray[questionNr].isAnswerd ) { + mw.log("Quiz: reflection point - submit"); $(this).off(); // disable 2nd click to prevent double submission // only on reflection point - when clicking on continue - submit the question and wait as all other questions _this.KIVQModule.submitAnswer(questionNr,0);