From eacb9f0208ffb5b1b6863a50833967ad36a4803b Mon Sep 17 00:00:00 2001 From: Isaiah Mayerchak Date: Sat, 2 Jul 2016 21:30:44 -0500 Subject: [PATCH] Listeners should be correctly attached to timed elements now --- runestone/assess/js/timed.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/runestone/assess/js/timed.js b/runestone/assess/js/timed.js index d9b232029..dbeaab5a4 100644 --- a/runestone/assess/js/timed.js +++ b/runestone/assess/js/timed.js @@ -65,7 +65,6 @@ Timed.prototype.init = function (opts) { this.incorrectStr = ""; this.skippedStr = ""; this.skipped = 0; - this.hasRenderedFirstQuestion = false; this.currentQuestionIndex = 0; // Which question is currently displaying on the page this.renderedQuestionArray = []; // list of all problems @@ -344,12 +343,8 @@ Timed.prototype.renderTimedQuestion = function () { // If the timed component has listeners, those might need to be reinitialized // This flag will only be set in the elements that need it--it will be undefined in the others and thus evaluate to false if (this.renderedQuestionArray[this.currentQuestionIndex].needsReinitialization) { - // if this is the first time we're rendering the first question, nothing should be reinitialized - if (this.currentQuestionIndex !== 0 || this.hasRenderedFirstQuestion) { - this.renderedQuestionArray[this.currentQuestionIndex].reinitializeListeners(); - } + this.renderedQuestionArray[this.currentQuestionIndex].reinitializeListeners(); } - this.hasRenderedFirstQuestion = true; };