Commit f5bc0241 by Douglas Hall Committed by GitHub

Merge pull request #295 from edx/douglashall/SOL-1844

SOL-1844 Allow for distinguishing between proctored exam and timed exam requests
parents 10fdd1d8 f8bd37ef
......@@ -137,8 +137,9 @@ var edx = edx || {};
self.timerTick ++;
self.secondsLeft --;
if (self.timerTick % 30 === 0){
var url = self.model.url + '/' + self.model.get('attempt_id') + '?sourceid=in_exam';
$.ajax(url).success(function(data) {
var url = self.model.url + '/' + self.model.get('attempt_id');
var queryString = '?sourceid=in_exam&proctored=' + this.model.get('taking_as_proctored');
$.ajax(url + queryString).success(function(data) {
if (data.status === 'error') {
// The proctoring session is in error state
// refresh the page to bring up the new Proctoring state from the backend.
......
......@@ -62,7 +62,11 @@ describe('ProctoredExamView', function () {
expect(reloadPage).toHaveBeenCalled();
});
it("resets the remainig exam time after the ajax response", function(){
this.server.respondWith("GET", "/api/edx_proctoring/v1/proctored_exam/attempt/" + this.proctored_exam_view.model.get('attempt_id') + '?sourceid=in_exam',
this.server.respondWith(
"GET",
"/api/edx_proctoring/v1/proctored_exam/attempt/" +
this.proctored_exam_view.model.get('attempt_id') +
'?sourceid=in_exam&proctored=true',
[
200,
{"Content-Type": "application/json"},
......
......@@ -34,7 +34,7 @@ def load_requirements(*requirements_paths):
setup(
name='edx-proctoring',
version='0.12.19',
version='0.12.20',
description='Proctoring subsystem for Open edX',
long_description=open('README.md').read(),
author='edX',
......
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