few fixes towards functional status

This commit is contained in:
Ross
2020-10-16 21:38:01 +01:00
parent 774a867f59
commit 644bf9ce76
10 changed files with 261 additions and 66 deletions
+3 -3
View File
@@ -14,7 +14,7 @@
dataType: 'json',
success: function (data) {
console.log(data.flagged);
if (data.flagged) {
if(data.flagged) {
$("#flagged-button").text("Flagged");
$("#flagged-button").attr("class", "flagged");
@@ -27,7 +27,7 @@
});
$("#id_answer").keyup(function (event) {
if (event.keyCode == 13) {
if(event.keyCode == 13) {
$(".btn-default").click();
}
});
@@ -64,7 +64,7 @@
<ul id=question-list>
{% for question in questions %}
<li><a class={% if question.pk in answered_questions %}answered{% else %}unanswered{% endif %}
href="{% url 'exam' pk=exam.pk sk=forloop.counter0 %}">{{ forloop.counter }}{% if question.pk in flagged_questions %}!{% endif %}</a>
href="{% url 'anatomy:exam_take' pk=exam.pk sk=forloop.counter0 %}">{{ forloop.counter }}{% if question.pk in flagged_questions %}!{% endif %}</a>
</li>
+1 -1
View File
@@ -4,6 +4,6 @@
<div class="anatomy">
<h1>{{ exam.name }}</h1>
This exam has {{question_number}} questions.
<p><button><a href="{% url 'anatomy:exam' pk=exam.pk sk=0 %}">Click here to start</a></button></p>
<p><button><a href="{% url 'anatomy:exam_take' pk=exam.pk sk=0 %}">Click here to start</a></button></p>
</div>
{% endblock %}