This commit is contained in:
Ross
2021-09-09 07:43:01 +01:00
parent 6a3b0906f1
commit 160e4914ca
4 changed files with 6 additions and 7 deletions
+2 -3
View File
@@ -59,10 +59,9 @@ $(document).ready(function () {
$("#question-mark-list li").show();
});
$(".show-unmarked-button").click(() => {
console.log("TESTIG");
$("#question-mark-list li").each((n, el) => {
console.log(el);
if (el.dataset.markcount < 1) { $(el).hide(); }
// Can't seem to get django to output this as a int....
if (parseInt(el.dataset.markcount) < 1) { $(el).hide(); }
})
});
+1 -1
View File
@@ -12,7 +12,7 @@
<ul id="question-mark-list">
{% for question, unmarked_count in question_unmarked_map %}
<li data-markcount={{unmarked_count|add:"0"}}><a href="{% url 'rapids:mark' pk=exam.pk sk=forloop.counter0 %}">Question {{forloop.counter }}:
<li data-markcount={{unmarked_count}}><a href="{% url 'rapids:mark' pk=exam.pk sk=forloop.counter0 %}">Question {{forloop.counter }}:
{{ question }}</a><br />Unmarked answers: {{unmarked_count}}</li>
{% endfor %}
</ul>
+1
View File
@@ -708,4 +708,5 @@ input {
.sticky-alert {
position: sticky;
top: 5px;
}
+2 -3
View File
@@ -59,10 +59,9 @@ $(document).ready(function () {
$("#question-mark-list li").show();
});
$(".show-unmarked-button").click(() => {
console.log("TESTIG");
$("#question-mark-list li").each((n, el) => {
console.log(el);
if (el.dataset.markcount < 1) { $(el).hide(); }
// Can't seem to get django to output this as a int....
if (parseInt(el.dataset.markcount) < 1) { $(el).hide(); }
})
});