diff options
-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): |