diff options
-rw-r--r-- | CHANGELOG.txt | 12 | ||||
-rw-r--r-- | online_test/__init__.py | 2 | ||||
-rw-r--r-- | yaksh/templates/yaksh/question.html | 2 | ||||
-rw-r--r-- | yaksh/templatetags/custom_filters.py | 3 |
4 files changed, 16 insertions, 3 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 5151c1d..e50ecd3 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,4 +1,14 @@ -=== 0.20.1 (21-05-2020) === +== 0.20.2 (02-06-2020) === + +* Added a custom filter to convert str objects to int in templates +* Fixed a bug that prevented users from seeing the last submitted MCQ answers +* Updated the TinyMCE editor with multiple plugins +* Fixed issue in question file upload for empty question instance +* Changed variable name for uploaded file to avoid conflict with the queryset variable +* Display question solution in view answer paper +* Fixed bug to check if attempts are allowed and spare time is available before answer is checked + +== 0.20.1 (21-05-2020) === * Rename celery.py to celery_settings.py to avoid conflicts with the celery app diff --git a/online_test/__init__.py b/online_test/__init__.py index 39ff9a3..dcc123e 100644 --- a/online_test/__init__.py +++ b/online_test/__init__.py @@ -4,4 +4,4 @@ from online_test.celery_settings import app as celery_app __all__ = ('celery_app',) -__version__ = '0.20.1' +__version__ = '0.20.2' 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 %} diff --git a/yaksh/templatetags/custom_filters.py b/yaksh/templatetags/custom_filters.py index 7dc29d4..7a065eb 100644 --- a/yaksh/templatetags/custom_filters.py +++ b/yaksh/templatetags/custom_filters.py @@ -38,6 +38,9 @@ def inprogress(answerpaper): def zip_longest_out(a, b): return zip_longest(a, b) +@register.filter(name='to_int') +def to_int(value): + return int(value) @register.filter(name="file_title") def file_title(name): |