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