diff options
author | ankitjavalkar | 2019-01-29 12:17:09 +0530 |
---|---|---|
committer | ankitjavalkar | 2019-02-06 15:26:12 +0530 |
commit | f1dde181a6c30d32ea4f4cf3d2d29b780c4d45a5 (patch) | |
tree | 653de0c11e80637a1fae65ad5db814f0bffd81c8 /yaksh | |
parent | 30c1119d3a1a5b7aaa96b80cb431c5b34eeb23b5 (diff) | |
download | online_test-f1dde181a6c30d32ea4f4cf3d2d29b780c4d45a5.tar.gz online_test-f1dde181a6c30d32ea4f4cf3d2d29b780c4d45a5.tar.bz2 online_test-f1dde181a6c30d32ea4f4cf3d2d29b780c4d45a5.zip |
Fix condition for comparison of current attempt number and maximum attempts allowed in _is_attempt_allowed
Diffstat (limited to 'yaksh')
-rw-r--r-- | yaksh/models.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/yaksh/models.py b/yaksh/models.py index cce90e7..7a4d8d1 100644 --- a/yaksh/models.py +++ b/yaksh/models.py @@ -1600,7 +1600,7 @@ class QuestionPaper(models.Model): attempts = AnswerPaper.objects.get_total_attempt(questionpaper=self, user=user, course_id=course_id) - return attempts != self.quiz.attempts_allowed + return attempts < self.quiz.attempts_allowed or self.quiz.attempts_allowed == -1 def can_attempt_now(self, user, course_id): if self._is_attempt_allowed(user, course_id): |