.
This commit is contained in:
@@ -85,6 +85,9 @@
|
|||||||
Mark</span>, <span class="incorrect">0 Marks</span></div>
|
Mark</span>, <span class="incorrect">0 Marks</span></div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if review %}
|
||||||
|
<button type="submit" name="next" class="check-review btn btn-default">Check review answers</button>
|
||||||
|
{% endif %}
|
||||||
{% if question_details.current > 1 %}
|
{% if question_details.current > 1 %}
|
||||||
<button type="submit" name="previous" class="save btn btn-default">Previous</button>
|
<button type="submit" name="previous" class="save btn btn-default">Previous</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@@ -99,4 +102,14 @@
|
|||||||
</span>
|
</span>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
{% if review %}
|
||||||
|
<script>
|
||||||
|
$("button.check-review").click(() =>{
|
||||||
|
$(".marking-list .answer").each((n, el) => {
|
||||||
|
console.log(n, el);
|
||||||
|
})
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
+4
-4
@@ -690,16 +690,16 @@ def mark(request, exam_pk, sk, unmarked_exam_answers_only=True, review=False):
|
|||||||
|
|
||||||
if review:
|
if review:
|
||||||
for ans in unmarked_user_answers:
|
for ans in unmarked_user_answers:
|
||||||
print(ans, half_mark_answers)
|
# duplicated from user answer model....
|
||||||
marked_ans = question.answers.filter(answer_compare__iexact=ans).first()
|
marked_ans = question.answers.filter(answer_compare__iexact=ans).first()
|
||||||
mark = "unmarked"
|
mark = "unmarked"
|
||||||
if marked_ans is not None:
|
if marked_ans is not None:
|
||||||
if marked_ans.status == Answer.MarkOptions.CORRECT:
|
if marked_ans.status == Answer.MarkOptions.CORRECT:
|
||||||
mark = 2
|
mark = "correct"
|
||||||
elif marked_ans.status == Answer.MarkOptions.HALF_MARK:
|
elif marked_ans.status == Answer.MarkOptions.HALF_MARK:
|
||||||
mark = 1
|
mark = "half-mark"
|
||||||
elif marked_ans.status == Answer.MarkOptions.INCORRECT:
|
elif marked_ans.status == Answer.MarkOptions.INCORRECT:
|
||||||
mark = 0
|
mark = "incorrect"
|
||||||
review_user_answers.append((ans, mark))
|
review_user_answers.append((ans, mark))
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user