.
This commit is contained in:
+20
-16
@@ -1889,6 +1889,11 @@ function reviewQuestions() {
|
|||||||
$("#review-overlay").hide();
|
$("#review-overlay").hide();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
console.log(db.user_answers)
|
||||||
|
console.log({
|
||||||
|
type: question_type,
|
||||||
|
qid: qid
|
||||||
|
})
|
||||||
db.user_answers
|
db.user_answers
|
||||||
.where({
|
.where({
|
||||||
type: question_type,
|
type: question_type,
|
||||||
@@ -1942,25 +1947,26 @@ function reviewQuestions() {
|
|||||||
) {
|
) {
|
||||||
if (normal) {
|
if (normal) {
|
||||||
el.html(
|
el.html(
|
||||||
"<span class='" +
|
`<span class='${c}'>Answer: ${user_answer} (Normal)</span>`
|
||||||
c +
|
|
||||||
"'>Answer: " +
|
|
||||||
user_answer +
|
|
||||||
" (Normal)</span>"
|
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
el.html(
|
el.html(
|
||||||
"<span class='" +
|
`<span class='${c}'>Answer: ${user_answer} (Abnormal: ${question_answers.join(', ')})</span>`
|
||||||
c +
|
|
||||||
"'>Answer: " +
|
|
||||||
user_answer +
|
|
||||||
" (Abnormal: " +
|
|
||||||
question_answers.join(", ") +
|
|
||||||
")</span>"
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function setAnatomyReviewAnswer(
|
||||||
|
el,
|
||||||
|
c,
|
||||||
|
user_answer,
|
||||||
|
question_answers
|
||||||
|
) {
|
||||||
|
el.html(
|
||||||
|
`<span class='${c}'>Answer: ${user_answer} (Correct answers: ${question_answers.join(', ')})</span>`
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
if (question_type == "rapid") {
|
if (question_type == "rapid") {
|
||||||
// First check normal vs abnormal
|
// First check normal vs abnormal
|
||||||
if (question["normal"] == true) {
|
if (question["normal"] == true) {
|
||||||
@@ -2028,20 +2034,18 @@ function reviewQuestions() {
|
|||||||
// Anatomy answers are either correct or incorrect
|
// Anatomy answers are either correct or incorrect
|
||||||
if (answerInArray(question_answers, section_1_answer)) {
|
if (answerInArray(question_answers, section_1_answer)) {
|
||||||
correct_count++;
|
correct_count++;
|
||||||
setReviewAnswer(
|
setAnatomyReviewAnswer(
|
||||||
el,
|
el,
|
||||||
"correct",
|
"correct",
|
||||||
section_1_answer,
|
section_1_answer,
|
||||||
false,
|
|
||||||
question_answers
|
question_answers
|
||||||
);
|
);
|
||||||
questions_correct[qid] = true;
|
questions_correct[qid] = true;
|
||||||
} else {
|
} else {
|
||||||
setReviewAnswer(
|
setAnatomyReviewAnswer(
|
||||||
el,
|
el,
|
||||||
"incorrect",
|
"incorrect",
|
||||||
section_1_answer,
|
section_1_answer,
|
||||||
false,
|
|
||||||
question_answers
|
question_answers
|
||||||
);
|
);
|
||||||
questions_correct[qid] = false;
|
questions_correct[qid] = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user