summaryrefslogtreecommitdiff
path: root/testapp/exam/models.py
diff options
context:
space:
mode:
authorankitjavalkar2015-06-17 16:08:04 +0530
committerankitjavalkar2015-06-22 16:51:53 +0530
commit924b0d1e39ec0d4f0ffab25c46e239c146f4a247 (patch)
tree86d1634cb9bfe72526db45fbcbff4b8471e1982c /testapp/exam/models.py
parentdd716fce438898e7bbc0dfd262eb424a4a800011 (diff)
downloadonline_test-924b0d1e39ec0d4f0ffab25c46e239c146f4a247.tar.gz
online_test-924b0d1e39ec0d4f0ffab25c46e239c146f4a247.tar.bz2
online_test-924b0d1e39ec0d4f0ffab25c46e239c146f4a247.zip
Fix test cases and code_server imports
Diffstat (limited to 'testapp/exam/models.py')
-rw-r--r--testapp/exam/models.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/testapp/exam/models.py b/testapp/exam/models.py
index e5a51af..1e1fbea 100644
--- a/testapp/exam/models.py
+++ b/testapp/exam/models.py
@@ -329,10 +329,7 @@ class AnswerPaper(models.Model):
def questions_left(self):
"""Returns the number of questions left."""
qu = self.get_unanswered_questions()
- if len(qu) == 0:
- return 0
- else:
- return qu.count('|') + 1
+ return len(qu)
def get_unanswered_questions(self):
"""Returns the list of unanswered questions."""