diff options
author | Prabhu Ramachandran | 2015-07-31 12:49:57 +0530 |
---|---|---|
committer | Prabhu Ramachandran | 2015-07-31 12:49:57 +0530 |
commit | 0225aad1492600ed53504b0986fd13da24c28ae9 (patch) | |
tree | 06e1598081ed64fcc2b034a0cac263f7fe46e354 /testapp/exam/models.py | |
parent | bbb991f8c6dbbcc6d12e93f3574ffcfbec2cb810 (diff) | |
parent | 3f0bb01600535b105c265e9da63814af06c0ab9d (diff) | |
download | online_test-0225aad1492600ed53504b0986fd13da24c28ae9.tar.gz online_test-0225aad1492600ed53504b0986fd13da24c28ae9.tar.bz2 online_test-0225aad1492600ed53504b0986fd13da24c28ae9.zip |
Merge pull request #51 from ankitjavalkar/add-travis
Add travis CI
Diffstat (limited to 'testapp/exam/models.py')
-rw-r--r-- | testapp/exam/models.py | 5 |
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.""" |