Merge branch 'master' of ssh://161.35.163.87:/home/django/rts

This commit is contained in:
Ross
2021-01-27 10:42:02 +00:00
2 changed files with 23 additions and 5 deletions
+21 -3
View File
@@ -61,7 +61,25 @@ export function postAnswers(ans) {
}
} else {
alert(`Error submitting answers: ${data.error}`);
}
});
// $.post( "http://localhost:8000/submit_answers", JSON.stringify(ans));
var docHeight = $(document).height();
$("body").append(`<div id='overlay'><span style='color: white'><p>An error has occured when submit your answers. A copy of your answers are displayed below, you may wish to save a copy. Please refresh this page to continue.</p>${JSON.stringify(ans)}</span></div>`);
$("#overlay")
.height(docHeight)
.css({
'opacity' : 0.9,
'position': 'absolute',
'top': 0,
'left': 0,
'background-color': 'black',
'width': '100%',
'user-select': 'text',
'-moz-user-select': 'text',
'-webkit-user-select': 'text',
'z-index': 5000
});
}
});
// $.post( "http://localhost:8000/submit_answers", JSON.stringify(ans));
}
+2 -2
View File
@@ -53,13 +53,13 @@ function retrievePacketList() {
url = window.config.exam_query_url;
}
$.getJSON(url, function (data) {
$.ajax({dataType: "json", cache: false, url: url, success : function (data) {
if (data.hasOwnProperty("exams")) {
loadExamList(data);
} else {
loadPacketList(data);
}
})
},})
.done(function () {})
.fail(function () {
$.getJSON("packets/packets.json", function (data) {