From a3962950e50223a55f3b6071e37d6d383163e464 Mon Sep 17 00:00:00 2001 From: ankitjavalkar Date: Thu, 28 May 2020 12:12:56 +0530 Subject: Add a custom filter to convert str to int and fix view last submitted MCQ answer --- yaksh/templates/yaksh/question.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'yaksh/templates') diff --git a/yaksh/templates/yaksh/question.html b/yaksh/templates/yaksh/question.html index 640003b..ae2f9f4 100644 --- a/yaksh/templates/yaksh/question.html +++ b/yaksh/templates/yaksh/question.html @@ -226,7 +226,7 @@ question_type = "{{ question.type }}"; {% if question.type == "mcq" %} {% for test_case in test_cases %} - {% if last_attempt and last_attempt|safe == test_case.id|safe %} + {% if last_attempt and last_attempt|to_int == test_case.id %} {{ test_case.options|safe }}
{% else %} -- cgit