diff options
author | ankitjavalkar | 2020-05-28 12:12:56 +0530 |
---|---|---|
committer | ankitjavalkar | 2020-05-28 12:12:56 +0530 |
commit | a3962950e50223a55f3b6071e37d6d383163e464 (patch) | |
tree | ddafcaca3bea8ed06b73d66316d8ddc31802ad1c /yaksh/templates | |
parent | 73dc8f6820c6c86fd8e70a68456ca2e541801bde (diff) | |
download | online_test-a3962950e50223a55f3b6071e37d6d383163e464.tar.gz online_test-a3962950e50223a55f3b6071e37d6d383163e464.tar.bz2 online_test-a3962950e50223a55f3b6071e37d6d383163e464.zip |
Add a custom filter to convert str to int and fix view last submitted MCQ answer
Diffstat (limited to 'yaksh/templates')
-rw-r--r-- | yaksh/templates/yaksh/question.html | 2 |
1 files changed, 1 insertions, 1 deletions
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 }}"; <!-- MCQ type question --> {% 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 %} <input name="answer" type="radio" value="{{ test_case.id }}" checked /> {{ test_case.options|safe }} <br/> {% else %} |