Commit d32f2784 by Diana Huang Committed by GitHub

Merge pull request #319 from edx/diana/increase-banner-polling

Increment banner polling from 30 seconds to 60 seconds.
parents 7459f31b 5e550a3f
......@@ -20,6 +20,7 @@ var edx = edx || {};
this.secondsLeft = 0;
/* give an extra 5 seconds where the timer holds at 00:00 before page refreshes */
this.grace_period_secs = 5;
this.poll_interval = 60;
this.first_time_rendering = true;
// we need to keep a copy here because the model will
......@@ -136,7 +137,7 @@ var edx = edx || {};
updateRemainingTime: function (self) {
self.timerTick ++;
self.secondsLeft --;
if (self.timerTick % 30 === 0){
if (self.timerTick % self.poll_interval === 0) {
var url = self.model.url + '/' + self.model.get('attempt_id');
var queryString = '?sourceid=in_exam&proctored=' + self.model.get('taking_as_proctored');
$.ajax(url + queryString).success(function(data) {
......
......@@ -75,7 +75,7 @@ describe('ProctoredExamView', function () {
})
]
);
this.proctored_exam_view.timerTick = 29; // to make the ajax call.
this.proctored_exam_view.timerTick = this.proctored_exam_view.poll_interval-1; // to make the ajax call.
var reloadPage = spyOn(this.proctored_exam_view, 'reloadPage');
this.proctored_exam_view.updateRemainingTime(this.proctored_exam_view);
this.server.respond();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment