diff options
author | maheshgudi | 2017-03-09 01:18:51 +0530 |
---|---|---|
committer | maheshgudi | 2017-03-09 01:18:51 +0530 |
commit | 1c5e1dfef3fb4af8bc070fe190cec552ef3732b0 (patch) | |
tree | 8b74b06882ab0d349be96a5a4938d25a63164847 /yaksh | |
parent | 433cc099527acfc7e5146c06f848c283a806f8b5 (diff) | |
download | online_test-1c5e1dfef3fb4af8bc070fe190cec552ef3732b0.tar.gz online_test-1c5e1dfef3fb4af8bc070fe190cec552ef3732b0.tar.bz2 online_test-1c5e1dfef3fb4af8bc070fe190cec552ef3732b0.zip |
pep8 changes in models and user_data
Diffstat (limited to 'yaksh')
-rw-r--r-- | yaksh/models.py | 7 | ||||
-rw-r--r-- | yaksh/templates/yaksh/user_data.html | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/yaksh/models.py b/yaksh/models.py index d60a377..fdf10bd 100644 --- a/yaksh/models.py +++ b/yaksh/models.py @@ -1153,7 +1153,8 @@ class AnswerPaper(models.Model): elif question.type == 'string': testcase = question.get_test_case() if testcase.string_check == "lower": - if testcase.correct.lower().splitlines() == user_answer.lower().splitlines(): + if testcase.correct.lower().splitlines()\ + == user_answer.lower().splitlines(): result['success'] = True result['error'] = ['Correct answer'] else: @@ -1164,8 +1165,8 @@ class AnswerPaper(models.Model): elif question.type == 'float': testcase = question.get_test_case() if abs(testcase.correct-user_answer) <= testcase.error_margin: - result['success'] = True - result['error'] = ['Correct answer'] + result['success'] = True + result['error'] = ['Correct answer'] elif question.type == 'code': user_dir = self.user.profile.get_user_dir() diff --git a/yaksh/templates/yaksh/user_data.html b/yaksh/templates/yaksh/user_data.html index 832e343..0bfd00e 100644 --- a/yaksh/templates/yaksh/user_data.html +++ b/yaksh/templates/yaksh/user_data.html @@ -76,7 +76,7 @@ User IP address: {{ paper.user_ip }} {% endif %} {% endfor %} - {{% elif question.type == "integer" or "string" or "float" %} + {% elif question.type == "integer" or "string" or "float" %} <h5> <u>Correct Answer:</u></h5> {% for testcase in question.get_test_cases %} <strong>{{ testcase.correct|safe }}</strong> |