.
This commit is contained in:
Vendored
+1
-1
@@ -4,5 +4,5 @@
|
||||
"javascript.format.insertSpaceAfterKeywordsInControlFlowStatements": false,
|
||||
"javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": false,
|
||||
"javascript.format.enable": false,
|
||||
"liveServer.settings.port": 5501
|
||||
"liveServer.settings.port": 5502
|
||||
}
|
||||
+8
-3
@@ -8,6 +8,8 @@ export function submitAnswers(exam_details, db, config) {
|
||||
.then((a) => {
|
||||
let json = {
|
||||
eid: exam_details.eid,
|
||||
cid: exam_details.cid,
|
||||
start_time: exam_details.start_time,
|
||||
answers: JSON.stringify(a),
|
||||
};
|
||||
postAnswers(json, config, exam_details);
|
||||
@@ -70,8 +72,7 @@ export function postAnswers(ans, config, exam_details) {
|
||||
);
|
||||
}
|
||||
$("#options-panel").show();
|
||||
} else {
|
||||
}
|
||||
} else {}
|
||||
} else {
|
||||
alert(`${data.question_count} answers sucessfully submitted.`);
|
||||
}
|
||||
@@ -174,7 +175,11 @@ console.log("post", type, qid, answer, e)
|
||||
return $.ajax({
|
||||
type: "POST",
|
||||
url: config.question_answer_submit_url,
|
||||
data: JSON.stringify({ qid: `${type}/${qid}`, answer: answer, status: 2 }),
|
||||
data: JSON.stringify({
|
||||
qid: `${type}/${qid}`,
|
||||
answer: answer,
|
||||
status: 2
|
||||
}),
|
||||
contentType: "application/json; charset=utf-8",
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
|
||||
@@ -13,6 +13,7 @@ let exam_details = {
|
||||
exam_mode: false,
|
||||
number_of_questions: null,
|
||||
question_order: [],
|
||||
start_time: null,
|
||||
};
|
||||
|
||||
let packet_list = [];
|
||||
@@ -2449,6 +2450,8 @@ $(".start-packet-button").click(function(evt) {
|
||||
}
|
||||
}
|
||||
|
||||
exam_details.start_time = new Date().getTime() / 1000;
|
||||
|
||||
if (timer != null) {
|
||||
timer.stop();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user