summaryrefslogtreecommitdiff
path: root/yaksh/models.py
diff options
context:
space:
mode:
authoradityacp2016-05-05 12:52:47 +0530
committeradityacp2016-05-05 12:52:47 +0530
commita2d3d14e03c7f6a873b4f838752878d2bcab44aa (patch)
tree61e0e7fe69010f59bc85bdf091a6c1c8ad127fe7 /yaksh/models.py
parent2f7891874aec1dec962d55e3b2aaed1c61d7acaa (diff)
downloadonline_test-a2d3d14e03c7f6a873b4f838752878d2bcab44aa.tar.gz
online_test-a2d3d14e03c7f6a873b4f838752878d2bcab44aa.tar.bz2
online_test-a2d3d14e03c7f6a873b4f838752878d2bcab44aa.zip
changes for download questions
Diffstat (limited to 'yaksh/models.py')
-rw-r--r--yaksh/models.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/yaksh/models.py b/yaksh/models.py
index 79db206..0ee5a3d 100644
--- a/yaksh/models.py
+++ b/yaksh/models.py
@@ -211,8 +211,8 @@ class Question(models.Model):
return json.dumps(question_info_dict)
- def dump_into_json(self, user):
- questions = Question.objects.filter(user_id = user.id)
+ def dump_into_json(self, question_ids, user):
+ questions = Question.objects.filter(id__in = question_ids, user_id = user.id)
questions_dict = [{'summary': question.summary,
'description': question.description,
'points': question.points, 'test': question.test,
@@ -511,7 +511,7 @@ class AnswerPaperManager(models.Manager):
return answerpapers.values_list('user', flat=True).distinct()
def get_latest_attempts(self, questionpaper_id):
- papers = self.get_answerpapers_for_quiz(questionpaper_id)
+ papers = self._get_answerpapers_for_quiz(questionpaper_id)
users = self._get_answerpapers_users(papers)
latest_attempts = []
for user in users: