summaryrefslogtreecommitdiff
path: root/yaksh/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'yaksh/models.py')
-rw-r--r--yaksh/models.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/yaksh/models.py b/yaksh/models.py
index 432f25e..60c4349 100644
--- a/yaksh/models.py
+++ b/yaksh/models.py
@@ -623,8 +623,7 @@ class QuestionPaper(models.Model):
def _get_questions_for_answerpaper(self):
""" Returns fixed and random questions for the answer paper"""
- questions = []
- questions = list(self.fixed_questions.all())
+ questions = list(self.fixed_questions.filter(active=True))
for question_set in self.random_questions.all():
questions += question_set.get_random_questions()
return questions
@@ -993,7 +992,7 @@ class AnswerPaper(models.Model):
return q_a
def get_questions(self):
- return self.questions.all()
+ return self.questions.filter(active=True)
def get_questions_answered(self):
return self.questions_answered.all()