continue unifying views

This commit is contained in:
Ross
2021-02-07 22:43:17 +00:00
parent 3712cf15fc
commit 8fbb50ee9f
12 changed files with 330 additions and 752 deletions
+7 -2
View File
@@ -110,7 +110,12 @@
ans: answers
}
postAnswers(ans);
let json = {
eid: {{exam.pk}},
answers: JSON.stringify([ans]),
};
postAnswers(json);
})
});
@@ -125,7 +130,7 @@
function postAnswers(ans) {
console.log(ans);
$.post("{% url 'physics:exam_answers_submit' %}", JSON.stringify(ans)).done((data) => {
$.post("{% url 'physics:exam_answers_submit' %}", ans, null, "json").done((data) => {
console.log(data);
if (data.success) {
let ret = confirm(