diff options
Diffstat (limited to 'testapp')
-rw-r--r-- | testapp/exam/views.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/testapp/exam/views.py b/testapp/exam/views.py index c6e3024..474fa2f 100644 --- a/testapp/exam/views.py +++ b/testapp/exam/views.py @@ -1155,7 +1155,8 @@ def design_questionpaper(request): question_paper.fixed_questions.add(question_id) if random_questions: for random_question, num in zip(random_questions, random_number): - question = Question.objects.get(id=random_question[0]) + qid = random_question.split(',')[0] + question = Question.objects.get(id=int(qid)) marks = question.points question_set = QuestionSet(marks=marks, num_questions=num) question_set.save() |