fix: quix show correct answers
This commit is contained in:
@@ -270,6 +270,8 @@ def check_choice_answers(question, answers):
|
|||||||
for num in range(1, 5):
|
for num in range(1, 5):
|
||||||
if question_details[f"option_{num}"] in answers:
|
if question_details[f"option_{num}"] in answers:
|
||||||
is_correct.append(question_details[f"is_correct_{num}"])
|
is_correct.append(question_details[f"is_correct_{num}"])
|
||||||
|
elif question_details[f"is_correct_{num}"]:
|
||||||
|
is_correct.append(2)
|
||||||
else:
|
else:
|
||||||
is_correct.append(0)
|
is_correct.append(0)
|
||||||
|
|
||||||
|
|||||||
@@ -239,7 +239,9 @@ const parse_choices = (element, is_correct) => {
|
|||||||
? add_icon(elem, "check")
|
? add_icon(elem, "check")
|
||||||
: add_icon(elem, "wrong");
|
: add_icon(elem, "wrong");
|
||||||
} else {
|
} else {
|
||||||
add_icon(elem, "minus-circle");
|
if (this.show_answers && is_correct[i] == 2)
|
||||||
|
add_icon(elem, "minus-circle-green");
|
||||||
|
else add_icon(elem, "minus-circle");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -711,9 +711,14 @@ const get_calendar_options = (element, calendar_id) => {
|
|||||||
event.start.d.d
|
event.start.d.d
|
||||||
)} - ${frappe.datetime.get_time(event.end.d.d)}">
|
)} - ${frappe.datetime.get_time(event.end.d.d)}">
|
||||||
<img class='icon icon-sm pull-right ${hide}' src="/assets/lms/icons/check.svg">
|
<img class='icon icon-sm pull-right ${hide}' src="/assets/lms/icons/check.svg">
|
||||||
<div> ${frappe.datetime.get_time(event.start.d.d)} -
|
<div>
|
||||||
${frappe.datetime.get_time(event.end.d.d)} </div>
|
<span class="calendar-event-title"> ${event.title} </span>
|
||||||
<div class="calendar-event-title"> ${event.title} </div>
|
<span>
|
||||||
|
${frappe.datetime.get_time(event.start.d.d)} - ${frappe.datetime.get_time(
|
||||||
|
event.end.d.d
|
||||||
|
)}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
</div>`;
|
</div>`;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user