This commit is contained in:
Ross
2021-08-01 11:15:38 +01:00
parent 79ea41017d
commit 036f1c9d5e
+3 -1
View File
@@ -253,16 +253,18 @@ async function loadExamList(data) {
console.log("Check question ids") console.log("Check question ids")
for (let q in question_json_id_hash) { for (let q in question_json_id_hash) {
let new_question_json_id = question_json_id_hash[q]; let new_question_json_id = question_json_id_hash[q];
console.log("new question json id") console.log("new question json id", new_question_json_id)
//q = q.toString(); //q = q.toString();
$("#cache-details ul").append( $("#cache-details ul").append(
`<li class="cache-item" data-qid=${q}>Question (${saved_exam.exam_type}): ${q}` `<li class="cache-item" data-qid=${q}>Question (${saved_exam.exam_type}): ${q}`
); );
// If a single question is out of date we invalidate the lot... // If a single question is out of date we invalidate the lot...
const q_object = { qid: String(q), type: saved_exam.exam_type }; const q_object = { qid: String(q), type: saved_exam.exam_type };
console.log(q_object);
question_db.question_data question_db.question_data
.get(q_object) .get(q_object)
.then((d) => { .then((d) => {
console.log("saved question data", d)
// d is undefined if the question is not saved // d is undefined if the question is not saved
// we should really just requeue the required question for dowload... // we should really just requeue the required question for dowload...
if (d == undefined || d.data.question_json_id != new_question_json_id) { if (d == undefined || d.data.question_json_id != new_question_json_id) {