From 07be6be0e805e17e45290b0e8137c044b2094edc Mon Sep 17 00:00:00 2001
From: mahesh
Date: Fri, 9 Feb 2018 15:43:44 +0530
Subject: Change custom filter function to get_answer_for_arrange_options
---
yaksh/forms.py | 2 +-
yaksh/models.py | 4 ++--
yaksh/templates/yaksh/grade_user.html | 2 +-
yaksh/templates/yaksh/question.html | 2 +-
yaksh/templates/yaksh/user_data.html | 2 +-
yaksh/templates/yaksh/view_answerpaper.html | 2 +-
yaksh/templatetags/custom_filters.py | 2 +-
yaksh/templatetags/test_custom_filters.py | 23 +++++++++--------------
8 files changed, 17 insertions(+), 22 deletions(-)
(limited to 'yaksh')
diff --git a/yaksh/forms.py b/yaksh/forms.py
index 9317a8e..4c690b1 100644
--- a/yaksh/forms.py
+++ b/yaksh/forms.py
@@ -35,7 +35,7 @@ question_types = (
("integer", "Answer in Integer"),
("string", "Answer in String"),
("float", "Answer in Float"),
- ("arrange", "Arrange Options in Order"),
+ ("arrange", "Arrange Options in Correct Order"),
)
test_case_types = (
diff --git a/yaksh/models.py b/yaksh/models.py
index 624f776..ffc3c56 100644
--- a/yaksh/models.py
+++ b/yaksh/models.py
@@ -54,7 +54,7 @@ question_types = (
("integer", "Answer in Integer"),
("string", "Answer in String"),
("float", "Answer in Float"),
- ("arrange", "Arrange Options in Order"),
+ ("arrange", "Arrange Options in Correct Order"),
)
@@ -1795,7 +1795,7 @@ class AnswerPaper(models.Model):
result['error'] = ['Correct answer']
elif question.type == 'arrange':
- tc_list = sorted([ids.id for ids in question.get_test_cases()])
+ tc_list = sorted([tc.id for tc in question.get_test_cases()])
if user_answer == tc_list:
result['success'] = True
result['error'] = ['Correct answer']
diff --git a/yaksh/templates/yaksh/grade_user.html b/yaksh/templates/yaksh/grade_user.html
index 09887c4..8430e91 100644
--- a/yaksh/templates/yaksh/grade_user.html
+++ b/yaksh/templates/yaksh/grade_user.html
@@ -318,7 +318,7 @@ Status : Failed
{% elif question.type == "arrange"%}