From 1ca397c5eb4a93dba52f39659f07e3d4e533d9fc Mon Sep 17 00:00:00 2001 From: Valera Rozuvan Date: Mon, 25 Feb 2013 13:28:19 +0200 Subject: [PATCH] Testing errors. --- common/lib/xmodule/xmodule/js/src/poll/poll_main.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/common/lib/xmodule/xmodule/js/src/poll/poll_main.js b/common/lib/xmodule/xmodule/js/src/poll/poll_main.js index 73761dbdcf..1f674ea56f 100644 --- a/common/lib/xmodule/xmodule/js/src/poll/poll_main.js +++ b/common/lib/xmodule/xmodule/js/src/poll/poll_main.js @@ -77,12 +77,24 @@ PollMain.prototype = { _this = this; + console.log('submit reset'); + // Send the data to the server as an AJAX request. Attach a callback that will // be fired on server's response. $.postWithPrefix( this.ajax_url + '/' + 'reset_poll', {}, function (response) { + console.log('success! response = '); + console.log(response); + + if ( + (response.hasOwnProperty('status') !== true) || + (typeof response.status !== 'string') || + (response.status.toLowerCase() !== 'success')) { + return; + } + _this.questionAnswered = false; _this.questionEl.find('.button.answered').removeClass('answered'); _this.questionEl.find('.stats').hide();