summaryrefslogtreecommitdiff
path: root/yaksh/models.py
diff options
context:
space:
mode:
authorankitjavalkar2019-03-25 11:53:26 +0530
committerankitjavalkar2019-03-25 11:53:26 +0530
commitef42d19a8884155da24398e7c27aade115a79ade (patch)
tree0959cfa850d10838a32b353d9cb228a5ec6cd594 /yaksh/models.py
parenta69d5f58b70206124a202ca4366bd9c0e6d4f1b6 (diff)
downloadonline_test-ef42d19a8884155da24398e7c27aade115a79ade.tar.gz
online_test-ef42d19a8884155da24398e7c27aade115a79ade.tar.bz2
online_test-ef42d19a8884155da24398e7c27aade115a79ade.zip
Fix PEP8 issues and variable names
Diffstat (limited to 'yaksh/models.py')
-rw-r--r--yaksh/models.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/yaksh/models.py b/yaksh/models.py
index 5f72ecf..7a40fae 100644
--- a/yaksh/models.py
+++ b/yaksh/models.py
@@ -716,17 +716,17 @@ class LearningModule(models.Model):
def get_passing_status(self, user, course):
course_status = CourseStatus.objects.filter(user=user, course=course)
- state = "failed"
if course_status.exists():
- ordered_units = self.learning_unit.filter(type='quiz').order_by("order")
+ learning_units_with_quiz = self.learning_unit.filter(type='quiz')
+ ordered_units = learning_units_with_quiz.order_by("order")
- status_list = [unit.quiz.get_answerpaper_passing_status(user, course)
+ statuses = [unit.quiz.get_answerpaper_passing_status(user, course)
for unit in ordered_units]
- if not status_list:
+ if not statuses:
status = False
else:
- status = all(status_list)
+ status = all(statuses)
return status
def is_prerequisite_passed(self, user, course):