Commit 5e550a3f by Diana Huang

Increment banner polling from 30 seconds to 60 seconds.

parent cb9e7767
...@@ -20,6 +20,7 @@ var edx = edx || {}; ...@@ -20,6 +20,7 @@ var edx = edx || {};
this.secondsLeft = 0; this.secondsLeft = 0;
/* give an extra 5 seconds where the timer holds at 00:00 before page refreshes */ /* give an extra 5 seconds where the timer holds at 00:00 before page refreshes */
this.grace_period_secs = 5; this.grace_period_secs = 5;
this.poll_interval = 60;
this.first_time_rendering = true; this.first_time_rendering = true;
// we need to keep a copy here because the model will // we need to keep a copy here because the model will
...@@ -136,7 +137,7 @@ var edx = edx || {}; ...@@ -136,7 +137,7 @@ var edx = edx || {};
updateRemainingTime: function (self) { updateRemainingTime: function (self) {
self.timerTick ++; self.timerTick ++;
self.secondsLeft --; 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 url = self.model.url + '/' + self.model.get('attempt_id');
var queryString = '?sourceid=in_exam&proctored=' + self.model.get('taking_as_proctored'); var queryString = '?sourceid=in_exam&proctored=' + self.model.get('taking_as_proctored');
$.ajax(url + queryString).success(function(data) { $.ajax(url + queryString).success(function(data) {
......
...@@ -75,7 +75,7 @@ describe('ProctoredExamView', function () { ...@@ -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'); var reloadPage = spyOn(this.proctored_exam_view, 'reloadPage');
this.proctored_exam_view.updateRemainingTime(this.proctored_exam_view); this.proctored_exam_view.updateRemainingTime(this.proctored_exam_view);
this.server.respond(); 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