Commit 53e3b1d5 by Chris Dodge

make sure we remove the polling interval before the confirmation dialog

parent 5b074962
......@@ -212,7 +212,7 @@ def create_exam_attempt(exam_id, user_id, taking_as_proctored=False):
allowance_extra_mins = int(allowance.value)
allowed_time_limit_mins += allowance_extra_mins
attempt_code = unicode(uuid.uuid4())
attempt_code = unicode(uuid.uuid4().upper())
external_id = None
if taking_as_proctored:
......
var edx = edx || {};
(function (Backbone, $, _) {
(function (Backbone, $, _, gettext) {
'use strict';
edx.coursware = edx.coursware || {};
......@@ -61,11 +61,11 @@ var edx = edx || {};
return this;
},
unloadMessage: function () {
return "As you are currently taking a proctored exam,\n" +
return gettext("As you are currently taking a proctored exam,\n" +
"you should not be navigation away from the exam.\n" +
"This may be considered as a violation of the \n" +
"proctored exam and you may be disqualified for \n" +
"credit eligibility in this course.\n";
"credit eligibility in this course.\n");
},
updateRemainingTime: function (self) {
self.$el.find('div.exam-timer').removeClass("low-time warning critical");
......@@ -80,4 +80,4 @@ var edx = edx || {};
}
});
this.edx.coursware.proctored_exam.ProctoredExamView = edx.coursware.proctored_exam.ProctoredExamView;
}).call(this, Backbone, $, _);
}).call(this, Backbone, $, _, gettext);
......@@ -42,6 +42,8 @@
<script type="text/javascript">
var _waiting_for_proctored_interval = null;
$(document).ready(function(){
var hasFlash = false;
......@@ -85,7 +87,7 @@
);
}
setInterval(
_waiting_for_proctored_interval = setInterval(
poll_exam_started,
5000
);
......@@ -95,6 +97,9 @@
var url = $('.instructions').data('exam-started-poll-url')
$.ajax(url).success(function(data){
if (data.started_at !== null) {
if (_waiting_for_proctored_interval != null) {
clearInterval(_waiting_for_proctored_interval)
}
// Let the student know exam has started and clock is running.
// this may or may not bring the browser window back to the
// foreground (depending on browser as well as user settings)
......
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