.
This commit is contained in:
@@ -52,10 +52,8 @@ CID: {{cid}}
|
||||
{% block js %}
|
||||
<script>
|
||||
$(document).ready(() => {
|
||||
{
|
||||
%
|
||||
if not exam.publish_results %
|
||||
}
|
||||
/* beautify ignore:start */
|
||||
{% if not exam.publish_results %}
|
||||
$("ul.sba-answer-list li").each((n, el) => {
|
||||
$(el).click((e) => {
|
||||
console.log(1, el.dataset.ans);
|
||||
@@ -63,12 +61,8 @@ CID: {{cid}}
|
||||
$("ul.sba-answer-list li").removeClass("selected");
|
||||
$(el).addClass("selected")
|
||||
})
|
||||
}) {
|
||||
%
|
||||
endif %
|
||||
}
|
||||
}) {% endif %}
|
||||
|
||||
/* beautify ignore:start */
|
||||
{% if saved_answer %}
|
||||
$("ul.sba-answer-list li[data-ans='{{saved_answer}}']").addClass("selected"); {% endif %}
|
||||
|
||||
@@ -77,12 +71,12 @@ CID: {{cid}}
|
||||
`<button class="question-menu-item" name="goto-${i}" data-qn="${i}">${i+1}</button>`));
|
||||
|
||||
}
|
||||
/* beautify ignore:end */
|
||||
$("button.question-menu-item").on("click", (e) => {
|
||||
console.log(e.currentTarget.dataset.qn);
|
||||
document.getElementById("goto-button").value = e.currentTarget.dataset.qn;
|
||||
$("#goto-button").click();
|
||||
});
|
||||
/* beautify ignore:end */
|
||||
})
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user