summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoradityacp2017-03-10 14:52:12 +0530
committeradityacp2017-03-10 15:41:07 +0530
commitec507b9a977811cfb9909e50133120476eaa9c6c (patch)
tree406e7c9dac58c0a7121188be364215880c80f930
parent97abdf46bad713e1ddab31175fbb7030e0257acb (diff)
downloadonline_test-ec507b9a977811cfb9909e50133120476eaa9c6c.tar.gz
online_test-ec507b9a977811cfb9909e50133120476eaa9c6c.tar.bz2
online_test-ec507b9a977811cfb9909e50133120476eaa9c6c.zip
Fix demo course creation for selenium tests
-rw-r--r--yaksh/models.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/yaksh/models.py b/yaksh/models.py
index 068bd66..c5e73f6 100644
--- a/yaksh/models.py
+++ b/yaksh/models.py
@@ -756,6 +756,9 @@ class QuestionPaper(models.Model):
questions = Question.objects.filter(active=True,
summary="Yaksh Demo Question",
user=user)
+ q_order = [str(que.id) for que in questions]
+ question_paper.fixed_questions_order = ",".join(q_order)
+ question_paper.save()
# add fixed set of questions to the question paper
question_paper.fixed_questions.add(*questions)